270 likes | 474 Views
Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze. Applied Statistics Using SAS and SPSS. Topic: Contrast and Non-parametric Test By Prof Kelly Fan, Cal State Univ, East Bay. Contrast. Consider the following data, which,
E N D
Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.
Applied Statistics Using SAS and SPSS Topic: Contrast and Non-parametric Test By Prof Kelly Fan, Cal State Univ, East Bay
Contrast Consider the following data, which, let’s say, are the column means of a one factor ANOVA, with the one factor being “DRUG”: 1 2 3 4 Consider 4 column means: Y.1 Y.2 Y.3 Y.4 6 4 1 -3 Grand Mean = Y.. = 2 # of replicates = n = 8
Contrast Example 1 1 3 4 2 Sulfa Type S1 Sulfa Type S2 Anti-biotic Type A Placebo Suppose the questions of interest are (1) Placebo vs. Non-placebo (2) S1 vs. S2 (3) (Average) S vs. A
For (1), we would like to test if the mean of Placebo is equal to the mean of other levels, i.e. the mean value of {Y.1-(Y.2 +Y.3 +Y.4)/3} is equal to 0. • For (2), we would like to test if the mean of S1 is equal to the mean of S2, i.e. the mean value of (Y.2-Y.3) is equal to 0. • For (3), we would like to test if the mean of Types S1 and S2 is equal to the mean of Type A, i.e. the mean value of {(Y.2 +Y.3 )/2-Y.4} is equal to 0.
In general, a question of interest can be expressed by a linear combination of column means such as with restriction that Saj = 0. Such linear combinations are called contrasts.
Example 1 (cont.): aj’s for the 3 contrasts P S1 S2 A 1234 -3 1 1 1 P vs. P: C1 S1 vs. S2:C2 S vs. A: C3 0 -1 1 0 0 -1 -1 2
5 6 7 10 Y.1 Y.2 Y.3 Y.4 C PS1 S2 A Placebo vs. drugs S1 vs. S2 Average S vs. A -3 8 1 1 1 1 0 1 -1 0 2 -1 -1 0 7
ANOVA F1-.05(3,28)=2.95
Test Results for the 3 Contrasts Source SSQ df MSQ F 42.64 4.00 65.36 8.53 .80 13.07 1 1 1 C1 C2 C3 42.64 4.00 65.36 Error 140 28 5 F1-.05(1,28)=4.20
Example 1 (Cont.): Conclusions • The mean response for Placebo is significantly different to that for Non-placebo. • There is no significant difference between using Types S1 and S2. • Using Type A is significantly different to using Type S on average.
Example 2: if the 4 treatments are as follows Y.1 Y.2 Y.3 Y.4 sulfa type sulfa type antibiotic type antibiotic type S1 S2 A1 A2
Exercise: • Suppose the questions of interest are: • The difference between sulfa types • The difference between antibiotic types • The difference between sulfa and antibiotic types, on average. • Write down the three corresponding contrasts.
Y.1 Y.2 Y.3 Y.4 C S1 S2 A1 A2 -1 1 0 1 S1 vs. S2 A1 vs. A2 Ave. S vs. Ave. A 0 -1 1 0 3 0 -1 -1 1 1 6 (5)(6)(7) (10)
Testing Several Contrasts Simultaneously • Let k be the number of contrasts of interest. • If k <= # of levels -1 Bonferroni method • If k > # of levels -1 Bonferroni or Scheffe method *Bonferroni Method: The same F test but use a = a/k, where a is a given significant level (usual at 5%). *Scheffe Method: see reference book. Reference: Statistical Principles of Research Design and Analysis by Robert O. Kuehl.
Another Example: The variable (coded) is mileage per gallon. Gasoline I II III IV V YIELD -4 19 21 10 18 Standard Gasoline Standard, plus additive A made by P Standard, plus additive B made by P Standard, plus additive A made by Q Standard, plus additive B made by Q
Questions actually chosen: Standard gasoline vs gasoline with an additive P vs. Q Between the two additives of P Between the two additives of Q (C1) (C2) (C3) (C4)
Exercise: give appropriate coefficients and then Cvalues I IIIII IV V Zi C1 C2 C3 C4
This assumes a “fixed model”:Inherent interest in the specificlevels of the factors under study - there’s no direct interest in extrapolating to other levels - inference will be limited to levels that appear in the experiment. Experimenter selects the levels If a “random model”: Levels in experiment randomly selected from a population of such levels, and inference is to be made about the entire population of levels.
Fixed: Specific levels chosen by the experimenter Random: Levels chosen randomly from a large number of possibilities Fixed: All Levels about which inferences are to be made are included in the experiment Random: Levels are some of a large number possible Fixed: A definite number of qualitatively distinguishable levels, and we plan to study them all, or a continuous set of quantitative settings, but we choose a suitable, definite subset in a limited region and confine inferences to that subset Random: Levels are a random sample from an infinite ( or large) population
“In a great number of cases the investigator may argue either way, depending on his mood and his handling of the subject matter. In other words, it is more a matter of assumption than of reality.” Some authors say that if in doubt, assume fixed model. Others say things like “I think in most experimental situations the random model is applicable.” [The latter quote is from a person whose experiments are in the field of biology].
My own feeling is that in most areas of management, a majority of experiments involve the fixed model [e.g., specific promotional campaigns, two specific ways of handling an issue on an income statement, etc.] . Many cases involve neither a “pure” fixed nor a “pure” random situation [e.g., selecting 3 prices from 6 “practical” possibilities]. Note that the issue sometimes becomes irrelevant in a practical sense when (certain) interactions are not present. Also note that each assumption may yield you the same “answer” in terms of practical application, in which case the distinction may not be an important one.
KRUSKAL - WALLIS TEST (Non - Parametric Alternative; Also called Wilcoxon test) HO: The probability distributions are identical for each level of the factor HI: Not all the distributions are the same
SPSS: Note the type of “group” must be changed to “numerical.” SAS: See page 192