Creating Unweighted Summary Statistics (Step 2) - SAS Programming

Now you are ready to complete the task by processing your new intermediate summary data set which contains one observation per subject per year.The result will be yearly unweighted means of the variables. Here is the code:

Example

PROC MEANS DATA=MEANOUT MEAN MAXDEC=2;
TITLE 'Averages Computed from Person Yearly Means';
CLASS YEAR;
VAR SBP DBP;
RUN;

The resulting output shows the mean SBP and DBP for each year,computed from the yearly means of each subject.Notice that since you specifically ask for only the MEAN statistic,that's all you get (actually, you also get N Obs because you are using a CLASS variable).Had you not done this, you would have gotten the default set of statistics as you did in the earlier example. Also, the MAXDEC=2 option limits output values to two decimal places.

Output from Example - Creating Unweighted Summary Statistics (Step 2)

Output from Example - Creating Unweighted Summary Statistics (Step 2)


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

SAS Programming Topics