Question: Using the SAS data set SASHELP.BWEIGHT, write all the SAS code necessary to calculate the average weight gain (MOMWTGAIN) for each level of smoking status

Using the SAS data set SASHELP.BWEIGHT, write all the SAS code necessary to calculate the average weight gain (MOMWTGAIN) for each level of smoking status (MOMSMOKE) by marital status (MARRIED). Then calculate the difference between each individual mother's weight gain and the average weight gain for that mother's smoking status and marital status. Exclude observations with missing data on the relevant variables from the calculations. To solve this problem you will need to use Proc Means to find the average weight gain for each condition and then do a merge so the values are available to find the difference for individual mothers. Hint Be sure to consider what to do with the _TYPE_ variable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!