0
votes

Here is the program.

proc means data = learn.blood noprint;
     var chol;
     output out = means( keep = AveChol )
            mean = AveChol;
run;

It is said that the proc means step creates a SAS data set (means) with one observation and one variable. I understand that it creates one variable with name chol. But why does it have only one observation?

Many thanks for your time and attention.

2
What are you expecting?Reeza

2 Answers

1
votes

There is only 1 mean for the variable CHOL.

0
votes

The output statement only writes the statistics you've requested (in this case, the mean of chol). It does not rewrite the entire input dataset (learn.blood). So you get one observation, since there's only one mean for your variable. Hope that helps.