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
Get step-by-step solutions from verified subject matter experts
