The TTEST procedure performs t tests and computes confidence limits for one sample, paired observations, two independent samples.
proc sort data=dataname1; by var1;
proc ttest data=dataname1
alpha=0.05
dist=normal
h0=1.2
ci=equal
plot=all;
where var1=1 or var1=2;
var var3;
class var1;
paired var6*var7;
run;
alpha
dist
h0
ci
plots
by
var
class
paired
Specifies that confidence intervals for the mean (except test-based mean confidence intervals when the TOST option is used) are to be 100(1-p%) confidence intervals.
Specifies distributional assumption (normal or lognormal). The default is NORMAL.
Requests tests against a null value of m. This can be used to compare the mean of 1 sample with some value m. By default, PROC TTEST uses H0=0 when TEST=DIFF (or DIST=NORMAL for a one-sample design)
Requests confidence interval for standard deviation or CV.
ci=equal for equal-tailed confidence interval,
ci=UMPU
ci=none for no confidence interval be displayed
Controls the plots produced through ODS Graphics
You can specify a BY statement in PROC TTEST to obtain separate analyses of observations in groups that are defined by the BY variables. When a BY statement appears, PROC TTEST expects the input data set to be sorted in order of the BY variables. (If there is two groups only in data)
The var statement names the variables to be used in the analyses. One-sample comparisons are conducted when the var statement is used without the CROSSOVER= option or CLASS statement. Two-independent-sample comparisons are conducted when the var statement is used with a CLASS statement.
A CLASS statement giving the name of the classification (or grouping) variable must accompany the PROC TTEST statement in the two-independent-sample case. It should be omitted for the one-sample, paired, and AB/BA crossover designs.
The pair-lists in the PAIRED statement identifies the variables to be compared in paired comparisons. You can use one or more pair-lists. Variables or lists of variables are separated by an asterisk (*) or a colon (:). The asterisk requests comparisons between each variable on the left with each variable on the right.
where A, B, C, and D are variables in the model