If we want to get some descriptive statistics, we can call the SAS means statistical process
-First intuitive experience, means process with no option:------------------------------------------------------------------------------------------------------------ ---
Proc means default statistic has n mean maximum minimum and standard deviation
DATA pgm2_1;
INPUT sex X @@;
CARDS;
1 308 0 305 0 311 1 298 0 315
1 0 321 0 294 1 The
1 308 1 308 1 321 0 298
;
RUN;
Proc Sort data = Pgm2_1;
by sex;
Run;
Proc means data = Pgm2_1;
var x;
by sex;
Run
Call the means procedure to analyze the variables and group statistics by sex variables; By statement requires the dataset to be sorted by the variable after
-Custom means process:------------------------------------------------------------------------------------------------------------- --
Data htwt;
Input subject gender$ height weight;
Datalines;
1 m 68.5 155
2 F 61.2
3 F 63.0
4 m 70.0 205
5 m 68.6 6
F 65.1 7
m 72.4 8
m< c10/>. 188
;
Proc means DATA=HTWT n mean std stderr CLM maxdec=2;
var height weight;
Run
Standard error: The standard deviation of the sample mean is the scale of the dispersion of the mean sampling distribution and the size of the mean sampling error, which reflects the variation between the sample mean. Standard errors are not standard deviations and are standard deviations from multiple sample averages.
The standard of the average is misused to denote the "confidence interval" of the mean, which makes sense when the sample comes from a prime sample. For example, if the sample is taken from a university, we can use an average height of 66.97 as an estimate of the average height of the student, and the standard error tells us how far this estimate is from the truth. If the overall population generally satisfies the positive distribution, the sample average has a 68% chance of falling to a standard error (1.51) of the truth value, and 95% falls within two standard errors (3.02).
Using CLM, the confidence interval of the sample average of 95% is given, that is to say, 95% of the certainty, the interval 63.27 to 70.67 contains the truth.
Common options for the-means process:----------------------------------------------------------------------------------------------------------- ----