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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started