Data Management

Joining Two JMP Data Tables

To combine the two data tables into a single data table, begin by opening both SmokingHealthcareExpenditures.jmp and SmokingDeterranceAndDemographics.jmp. The State columns in each data table must be the same list of values for the join to execute properly. In our case, both State columns contain the full name of each State (e.g., Alabama, New York, etc.) and therefore will join correctly. There are two components of a join: how many rows are retained and how the records are matched. In this instance we are choosing an inner join as it returns all rows where there is a match and also an equijoin, as the operator that is used to match the rows is equality. The two data tables will be joined by matching the “State” columns where the State values are equal. Click on the data table SmokingHealthcareExpenditures.jmp to make it the active window. Select Tables > Join and highlight the fields as shown in Figure 5.1 Completed Join Dialog. In the “Output table name” field enter “SmokingCostsCombined” as the name of the new table.
Figure 5.1 Completed Join Dialog
Click on the Match button to enter that the “State” columns as the matching columns. The result is shown in Figure 5.2 Tables>Join Dialog after Selecting the Matching Columns.
Figure 5.2 Tables>Join Dialog after Selecting the Matching Columns
Click the OK button to join the two data tables into the single table SmokingCostsCombined.jmp. See the Data Definitions section for an explanation of the columns contained in this file.

Creating a New Column Using the Formula Editor

In the case “Health Care Costs Associated with Smoking: A National Perceptive,” a heat map of total health care expenses suggested that states with larger populations had larger total health care expenses. This is to be expected as larger populations will have more smokers and hence more smoking-related costs. To compare states of different population sizes equitably, we can adjust the health care expenditures for population size. This can be done by creating new columns with the formula editor. To create total health care expenditures adjusted for state population, navigate to the last column in the data table and double click to the right to add a new column. Double click on the column header and enter the column name “Adjusted Total Healthcare Expense ($ mil/capita)” then right click and select Formula. Enter the formula as shown in Figure 5.3 Formula to Create Adjusted Total Healthcare Expenditures.
Figure 5.3 Formula to Create Adjusted Total Healthcare Expenditures
Click OK to create the population adjusted total health care expense. Figure 5.4 Sample of Adjusted Total Healthcare Expense Values shows the first few rows of the data table now containing adjusted total health care expense.
Figure 5.4 Sample of Adjusted Total Healthcare Expense Values
After creating a new formula always examine the result. Notice that the units of millions of dollars per capita is not intuitive. When reporting total health care expense per capita, units of dollars per person would be more easily understood. Modify the formula as shown in Figure 5.5 Formula to Create Adjusted Total Healthcare Expense in Units of $/capita to change the units to dollars per capita.
Figure 5.5 Formula to Create Adjusted Total Healthcare Expense in Units of $/capita
Modify the column name to reflect the units of dollars per capita.
Examining summary statistics is a good practice to check if the values obtained from the formula make sense in the context of the problem. Figure 5.6 Summary Statistics for Total Healthcare Expenditures ($/capita) shows summary statistics generated from the Tabulate platform.
Figure 5.6 Summary Statistics for Total Healthcare Expenditures ($/capita)
Across the United States the average annual cost per person for smoking-related health care costs is $459.08. An internet search can quickly validate the reasonableness of this per capita average. The column Cessation Expenditures ($) should also be adjusted to a per capita basis.
Last updated: October 12, 2017
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset