Vous êtes sur la page 1sur 3

• The t-test and ANOVA examine whether group means differ from one another.

The t-test compares two groups, while ANOVA can do more than two
groups.
• The t-test ANOVA have three assumptions: independence assumption (the
elements of one sample are not related to those of the other sample),
normality assumption (samples are randomly drawn from the normally
distributed populstions with unknown population means; otherwise the
means are no longer best measures of central tendency, thus test will not
be valid), and equal variance assumption (the population variances of the
two groups are equal)
• ANCOVA (analysis of covariance) includes covariates, interval independent
variables, in the right-hand side to control their impacts. MANOVA
(multivariate analysis of variance) has more than one left-hand side
variable.
Analysis LHS (interval) RHS (categorical) Notes
T-test Single Single (binary)
One-way Single Single
Two-way Single Two (multiple)
ANCOVA Single Multiple Covariates
MANOVA Multiple Multiple
The following diagram summarizes the t-tes and one-way ANOVA.
• SAS has the UNIVARIATE, MEANS, and TTEST procedures for t-test, while
SAS ANOVA, GLM, and MIXED procedures conduct ANOVA.
• The ANOVA procedure is able to handle balanced data only, but the GLM and
MIXED procedures can deal with both balanced and unbalanced data. The
t-test and one-way ANOVA do not matter whether data are balanced or
not.
• STATA has the .ttest, and the .ttesti commands for t-test, and the .anova, and
.manova commands conduct ANOVA. Note STATA .glm command is not
used for ANOVA.

T-TEST
One Sample T-Test
The MU0 option specifies a value of the null hypothesis. The ALPHA option
specifies the significance level. The T option in the MEANS procedure runs the t-
test.
Paired T-Test
Note that STATA .ttest command does not have the "unpaired" option. SAS
PAIRED statement is able to compare multiple pairs.

Two Independent Samples T-Test
The TTEST procedure reports two T statistics: one under the equal variance
assumptio and the other for unequal variance. Users have to check the equal
variance test (F test) first. If not rejected, read the T statistic and its p-value of
pooled analysis. If rejected, read the T statistic and its p-value of Satterthwaite or
Cochran/Cox approximation.
STATA is able to conduct the t-test for two independnet samples even When
data are arranged in two variables without a group varialbe. The unpaired option
indicates that the two variables are independent, and the welch option asks
STATA produces Welch approximation of degree of freedom. Note STATA does
not give us Cochran/Cox approximation.
T-Test on Aggregate Data
The FREQ statement in the TTEST procedure can handle aggregate data
STATA .ttesti command enables you to conduct t-test using aggregated
descriptive statistics. The numbers listed are the number of observation, mean,
and standard deviation of first sample and of second sample.

ONE-WAY ANOVA
This experimental design is often called completely randomized design (CRD).
SAS has the ANOVA, GLM (Generalized Linear Model), MIXED Procedures for
one-way ANOVA. Their usages are identical.
STATA has the .anova and .oneway command for one-way ANOVA.

You may add the MEANS statement in both ANOVA and GLM procedures to
compute means of groups and perform multiple comparison tests such as
DUNCAN, TUKEY, DUNNETT, and BON.

TWO-WAY ANOVA
Randomized Complete Block (RCB): Treatments are assigned at random within
blocks of adjacent subjects, each treatment once per block. The number of
blocks is the number of replications. Any treatment can be adjacent to any other
treatment, but not to the same treatment within the block.
Again, the ANOVA, GLM, and MIXED conduct the two-way ANOVA with the
identical usage.
In the case of the randomized complete block design, you may have one
observation in each cell. So, including an interaction term is meaningless,
producing awkward results. But it is noteworthy that the sum of squares due to
error (SSE) is equivalent to the sum of squares of interaction (SSI).
You may compare group means using the MEANS or the LSMEANS (least
squares means) statement. The LSMEANS statement is not available in the
ANOVA procedure.

REFERENCES
• Littell, Ramon C., Walter W. Stroup, and Rudolf J. Freund. 2002. SAS for
Linear Models, 4th ed. Cary, NC: SAS Institute.
• Littell, Ramon C., George A. Milliken, Walter W. Stroup, and Russell D.
Wolfinge. 2006. SAS System for Mixed Models. 2nd ed. Cary, NC: SAS
Institute.
• Stata Press. 2003. Stata Base Reference Manual Release 8. College Station,
TX: Stata Press.
http://www.tfrec.wsu.edu/ANOVA/

Vous aimerez peut-être aussi