Professional Documents
Culture Documents
SAS Code Workshop 1
SAS Code Workshop 1
data hypertension;
input rat temp bp;
datalines;
1 26 152
2 26 157
3 26 179
4 26 182
5 26 176
6 26 149
7 5 384
8 5 369
9 5 354
10 5 375
11 5 366
12 5 423
;
run;
*Check the SAS log now. You can see that the data have imported, and there are now
12 observations in the data set work.hypertension. The "work." prefix for the data
set indicates the SAS library in which the data are contained.;
*notice that until we change the title, all output has the previously specified
title;
*by default, SAS runs a hypothesis test that the mean is zero in proc univariate;
*adjust the hypothesized mean by using the command mu0=;
*add a confidence interval for the mean and standard deviation by using the command
cibasic;
*add a confidence interval for the median by using the command cipctldf;
*you can change the level alpha of the test or CIs. The default is 5%;
*note that the default hypothesis test in proc univariate is a two-sided test.
Divide the p-value by two to obtain the p-value for a one-sided test.;