Hi, Lister:
Could you show me how to conduct Manova in SPSS programming?
Thanks!
Example 1
* Analysis of Variance
MANOVA RESULT BY TREATMNT( 1,4) GROUP( 1,2).
Example 2
* Analysis of Covariance
MANOVA RESULT BY TREATMNT( 1,4) GROUP( 1,2) WITH RAINFALL.
Example 3
* Repeated Measures Analysis
MANOVA SCORE1 TO SCORE4 BY CLASS( 1,2) / WSFACTORS= MONTH( 4).
Example 4
* Parallelism Test with Crossed Factors
MANOVA YIELD BY PLOT( 1,4) TYPEFERT( 1,3) WITH FERT
/ ANALYSIS YIELD
/ DESIGN FERT, PLOT, TYPEFERT, PLOT BY TYPEFERT, FERT BY PLOT + FERT BY TYPEFERT + FERT BY PLOT BY TYPEFERT.
MANOVA ( multivariate analysis of variance) is a generalized procedure for analysis of variance and covariance. MANOVA is a powerful analysis- of- variance procedure and can be used for both univariate and multivariate designs. MANOVA allows you to perform the following tasks:
? Specify nesting of effects.
? Specify individual error terms for effects in mixed- model analyses.
? Estimate covariate- by- factor interactions to test the assumption of homogeneity of regressions.
? Obtain parameter estimates for a variety of contrast types, including irregularly spaced polynomial contrasts with multiple factors.
? Test user- specified special contrasts with multiple factors.
? Partition effects in models. ? Pool effects in models.
MANOVA YIELD BY SEED( 1,4) FERT( 1,3) WITH RAINFALL
/ PRINT= CELLINFO( MEANS) PARAMETERS( ESTIM)
/ DESIGN.
YIELD is the dependent variable; SEED ( with values 1, 2, 3, and 4) and FERT ( with values 1, 2, and 3) are factors; RAINFALL is a covariate.
The PRINT subcommand requests the means of the dependent variable for each cell and the default deviation parameter estimates.
Example
MANOVA DEPENDNT BY FACTOR1 ( 1,3) FACTOR2, FACTOR3 ( 1,2).
In this example, three factors are specified.
FACTOR1 has values 1, 2, and 3, while FACTOR2 and FACTOR3 have values 1 and 2.
A default full factorial model is used for the analysis.
Example
MANOVA DEP BY A( 1,2) B( 1,4)
/ ERROR = 1
/ DESIGN = A, B, A BY B = 1 VS WITHIN
/ DESIGN = A, B.
ERROR defines error term 1 as the default error term.
In the first design, A by B is defined as error term 1 and is therefore used to test the A and B effects. The A by B effect itself is explicitly tested against the within- cells error.
In the second design, no term is defined as error term 1, so no significance tests are carried out. Hypothesis sums of squares are displayed for A and B.
Example
MANOVA DEP BY FAC( 1,5)
/ CONTRAST( FAC)= DIFFERENCE
/ DESIGN= FAC( 1) FAC( 2) FAC( 3) FAC( 4).
The factor FAC has five categories and therefore four degrees of freedom.
CONTRAST requests DIFFERENCE contrasts, which compare each level ( except the first) with the mean of the previous levels.
Each of the four degrees of freedom is tested individually on the DESIGN subcommand.
Example
MANOVA OUTCOME BY TREATMNT( 1,12)
/ PARTITION( TREATMNT) = ( 3* 2,4)
/ DESIGN TREATMNT( 2).
The factor TREATMNT has 12 categories, hence 11 degrees of freedom.
PARTITION divides the effect of TREATMNT into four partitions, containing, respectively, 2, 2, 2, and 4 degrees of freedom. A fifth partition is formed to contain the remaining 1 degree of freedom.
DESIGN specifies a model in which only the second partition of TREATMNT is tested. This partition contains the third and fourth degrees of freedom.
Since the default contrast type for between- subjects factors is DEVIATION, this second partition represents the deviation of the third and fourth levels of TREATMNT from the grand mean.
Example MANOVA DEP BY A B C ( 1,4)
/ METHOD= NOCONSTANT
/ DESIGN= A, B, C
/ METHOD= CONSTANT SEQUENTIAL
/ DESIGN.
For the first design, a main- effects model, the METHOD subcommand requests the model to be fitted with no constant.
The second design requests a full factorial model to be fitted with a constant and with a sequential decomposition of sums of squares.
Example
MANOVA DEP BY A( 1,3) B( 1,2)
/ OMEANS= TABLES( A, B)
/ DESIGN.
Because there is no VARIABLES specification on the OMEANS subcommand, observed means are displayed for all continuous variables. DEP is the only dependent variable here, and there are no covariates.
The TABLES specification on the OMEANS subcommand requests tables of observed means for each of the three categories of A ( collapsing over B) and for both categories of B ( collapsing over A).
Example
MANOVA DEP BY A( 1,4) B( 1,3)
/ PMEANS TABLES( A, B, A BY B)
/ DESIGN = A, B.
PMEANS displays the default table of observed and predicted means for DEP and raw and standardized residuals in each of the 12 cells in the model.
The TABLES specification on PMEANS displays tables of predicted means for A ( collapsing over B), for B ( collapsing over A), and all combinations of A and B.
Because A and B are the only factors in the model, the means for A by B in the TABLES specification come from every cell in the model. They are identical to the adjusted predicted means in the default PMEANS table, which always includes all non- empty cells.
Predicted means for A by B can be requested in the TABLES specification, even though the A by B effect is not in the design.
Example
GET FILE IRIS.
MANOVA SEPALLEN SEPALWID PETALLEN PETALWID BY TYPE( 1,3)
/ MATRIX= OUT( MANMTX).
MANOVA reads data from the SPSS data file IRIS and writes one set of matrix materials to the file MANMTX.
The working data file is still IRIS. Subsequent commands are executed on the file IRIS.
Example
GET FILE IRIS.
MANOVA SEPALLEN SEPALWID PETALLEN PETALWID BY TYPE( 1,3)
/ MATRIX= OUT(*).
LIST.
MANOVA writes the same matrix as in the example above. However, the matrix file replaces the working data file.
The LIST command is executed on the matrix file, not on the file IRIS.
Example
GET FILE= PRSNNL.
FREQUENCIES VARIABLE= AGE.
MANOVA SEPALLEN SEPALWID PETALLEN PETALWID BY TYPE( 1,3)
/ MATRIX= IN( MANMTX).
This example assumes that you want to perform a frequencies analysis on the file PRSNNL and then use MANOVA to read a different file. The file you want to read is an existing SPSS
Example MANOVA Y BY A( 1,2) B( 1,2) C( 1,3)
/ DESIGN
/ DESIGN A, B, C
/ DESIGN A, B, C, A BY B, A BY C.
The first DESIGN produces the default full factorial design, with all main effects and interactions for factors A, B, and C.
The second DESIGN produces an analysis with main effects only for A, B, and C.
The third DESIGN produces an analysis with main effects and the interactions between A and the other two factors. The interaction between B and C is not in the design, nor is the interaction between all three factors.
Example
MANOVA YIELD BY SEED( 1,4) WITH RAINFALL
/ PARTITION( SEED)=( 2,1)
/ DESIGN= SEED( 1) SEED( 2).
Factor SEED is subdivided into two partitions, one containing the first two degrees of freedom and the other the last degree of freedom.
The two partitions of SEED are treated as independent effects.
Example
MANOVA YIELD BY SEED( 1,4) FERT( 1,3) PLOT ( 1,4)
/ DESIGN = FERT WITHIN SEED BY PLOT.
The three factors in this example are type of seed ( SEED), type of fertilizer ( FERT), and location of plots ( PLOT).
The DESIGN subcommand nests the effects of FERT within the interaction term of SEED by PLOT. The levels of FERT are considered distinct for each combination of levels of SEED and PLOT.
Example
MANOVA YIELD BY SEED( 2,4) FERT( 1,3) PLOT ( 3,5)
/ DESIGN = FERT WITHIN PLOT( 1) WITHIN SEED( 2)
This example requests the effect of FERT within the second SEED level of the first PLOT level.
The second SEED level is associated with value 3 and the first PLOT level is associated with value 3. Use MWITHIN to request simple effects of within- subjects factors in repeated measures analysis ( see MANOVA: Repeated Measures).
Example
MANOVA Y BY A( 1,3) B( 1,4) WITH X
/ ANALYSIS= Y
/ DESIGN= A, B, A BY B, A BY X + B BY X + A BY B BY X.
This example shows how to test homogeneity of regressions in a two- way analysis of variance.
The + signs are used to produce a pooled test of all interactions involving the covariate X. If this test is significant, the assumption of homogeneity of variance is questionable.
Example
* This example tests whether the regression of the dependent variable Y on the two variables X1 and X2 is the same across all the categories of the factors AGE and TREATMNT.
MANOVA Y BY AGE( 1,5) TREATMNT( 1,3) WITH X1, X2
/ ANALYSIS = Y
/ DESIGN = POOL( X1, X2), AGE, TREATMNT, AGE BY TREATMNT, POOL( X1, X2) BY AGE + POOL( X1, X2) BY TREATMNT + POOL( X1, X2) BY AGE BY TREATMNT.
ANALYSIS excludes X1 and X2 from the standard treatment of covariates, so that they can be used in the design.
DESIGN includes five terms. POOL( X1, X2), the overall regression of the dependent variable on X1 and X2, is entered first, followed by the two factors and their interaction.
The last term is the test for equal regressions. It consists of three factor- by- continuous variable interactions pooled together. POOL( X1, X2) BY AGE is the interaction between AGE and the combined effect of the continuous variables X1 and X2. It is combinedwith similar interactions between TREATMNT and the continuous variables and between the AGE by TREATMNT interaction and the continuous variables.
If the last term is not statistically significant, there is no evidence that the regression of Y on X1 and X2 is different across any combination of the categories of AGE and TREATMNT.
[此贴子已经被作者于2006-5-21 12:58:26编辑过]
Example
MANOVA DEP BY A, B, C ( 1,3)
/ DESIGN= A VS 1,
B WITHIN A = 1 VS 2,
C WITHIN B WITHIN A = 2 VS WITHIN.
In this example, the factors A, B, and C are completely nested; levels of C occur within levels of B, which occur within levels of A. Each factor is tested against everything within it.
A, the outermost factor, is tested against the B within A sum of squares, to see if it contributes anything beyond the effects of B within each of its levels. The B within A sum of squares is defined as error term number 1.
B nested within A, in turn, is tested against error term number 2, which is defined as the C within B within A sum of squares.
Finally, C nested within B nested within A is tested against the within- cells sum of squares.
Example
MANOVA WT1, WT2, WT3, WT4 BY TREATMNT( 1,3) WITH COV
/ TRANSFORM ( WT1 TO WT4) = POLYNOMIAL
/ RENAME = MEAN, LINEAR, QUAD, CUBIC, *
/ ANALYSIS = MEAN, LINEAR, QUAD WITH COV
/ DESIGN.
After the polynomial transformation of the four WT variables, RENAME assigns appropriate names to the various trends.
Even though only four variables were transformed, RENAME applies to all five continuous variables. An asterisk is required to retain the original name for COV.
The ANALYSIS subcommand following RENAME refers to the interval variables by their new names.
Example
MANOVA A, B, C, D, E BY FAC( 1,4) WITH F G
/ ANALYSIS = ( A, B / C / D WITH E) WITH F G
/ DESIGN.
A final covariate list WITH F G is specified outside the parentheses. The covariates apply to every list within the parentheses.
The first analysis uses A and B, with F and G as covariates.
The second analysis uses C, with F and G as covariates.
The third analysis uses D, with E, F, and G as covariates.
Factoring out F and G is the only way to use them as covariates in all three analyses, since no variable can be named more than once on an ANALYSIS subcommand.
Example MANOVA A B C BY FAC( 1,3)
/ ANALYSIS( CONDITIONAL) = ( A WITH B / C)
/ DESIGN.
In the first analysis, A is the dependent variable, B is a covariate, and C is not used.
In the second analysis, C is the dependent variable, and both A and B are covariates.
Example
MANOVA Y1 TO Y4 BY GROUP( 1,2)
/ WSFACTORS= YEAR( 4)
/ CONTRAST( YEAR)= POLYNOMIAL
/ RENAME= CONST, LINEAR, QUAD, CUBIC
/ PRINT= TRANSFORM PARAM( ESTIM)
/ WSDESIGN= YEAR / DESIGN= GROUP.
WSFACTORS immediately follows the MANOVA variable list and specifies a repeated measures analysis in which the four dependent variables represent a single variable measured at four levels of the within- subjects factor. The within- subjects factor is called YEAR for the duration of the MANOVA procedure.
CONTRAST requests polynomial contrasts for the levels of YEAR. Because the four variables, Y1, Y2, Y3, and Y4, in the working data file represent the four levels of YEAR, the effect is to perform an orthonormal polynomial transformation of these variables.
RENAME assigns names to the dependent variables to reflect the transformation.
PRINT requests that the transformation matrix and the parameter estimates be displayed.
WSDESIGN specifies a within- subjects design that includes only the effect of the YEAR within- subjects factor. Because YEAR is the only within- subjects factor specified, this is the default design, and WSDESIGN could have been omitted.
DESIGN specifies a between- subjects design that includes only the effect of the GROUP between- subjects factor. This subcommand could have been omitted.
Example
MANOVA MATH1 TO MATH4 BY METHOD( 1,2) WITH PHYS1 TO PHYS4 ( SES)
/ WSFACTORS= SEMESTER( 4).
The four dependent variables represent a score measured four times ( corresponding to the four levels of SEMESTER).
The four varying covariates PHYS1 to PHYS4 represents four measurements of another score.
SES is a constant covariate. Its value does not change over the time covered by the four levels of SEMESTER.
Default contrast ( POLYNOMIAL) is used.
MANOVA X1Y1 X1Y2 X2Y1 X2Y2 X3Y1 X3Y2 BY TREATMNT( 1,5) GROUP( 1,2)
/ WSFACTORS= X( 3) Y( 2)
/ DESIGN.
The MANOVA variable list names six dependent variables and two between- subjects factors, TREATMNT and GROUP.
WSFACTORS identifies two within- subjects factors whose levels distinguish the six dependent variables. X has three levels and Y has two. Thus, there are cells in the within- subjects design, corresponding to the six dependent variables.
Variable X1Y1 corresponds to levels 1,1 of the two within- subjects factors; variable X1Y2 corresponds to levels 1,2; X2Y1 to levels 2,1; and so on up to X3Y2, which corresponds to levels 3,2. The first within- subjects factor named, X, varies most slowly, and the last within- subjects factor named, Y, varies most rapidly on the list of dependent variables.
Because there is no WSDESIGN subcommand, the within- subjects design will include all main effects and interactions: X, Y, and X by Y.
Likewise, the between- subjects design includes all main effects and interactions: TREATMNT, GROUP, and TREATMNT by GROUP.
In addition, a repeated measures analysis always includes interactions between the withinsubjects factors and the between- subjects factors. There are three such interactions for each of the three within- subjects effects.
Example
MANOVA SCORE1 SCORE2 SCORE3 BY GROUP( 1,4)
/ WSFACTORS= ROUND( 3)
/ CONTRAST( ROUND)= DIFFERENCE / CONTRAST( GROUP)= DEVIATION
/ PRINT= TRANSFORM PARAM( ESTIM).
? This analysis has one between- subjects factor, GROUP, with levels 1, 2, 3, and 4, and one within- subjects factor, ROUND, with three levels that are represented by the three dependent variables.
? The first CONTRAST subcommand specifies difference contrasts for ROUND, the withinsubjects factor.
? There is no WSDESIGN subcommand, so a default full factorial within- subjects design is assumed. This could also have been specified as WSDESIGN= ROUND, or simply WSDESIGN.
? The second CONTRAST subcommand specifies deviation contrasts for GROUP, the between- subjects factor. This subcommand could have been omitted because deviation contrasts are the default.
? PRINT requests the display of the transformation matrix generated by the within- subjects contrast and the parameter estimates for the model.
? There is no DESIGN subcommand, so a default full factorial between- subjects design is assumed. This could also have been specified as DESIGN= GROUP, or simply DESIGN.
Example
MANOVA JANLO, JANHI, FEBLO, FEBHI, MARLO, MARHI BY SEX( 1,2)
/ WSFACTORS MONTH( 3) STIMULUS( 2)
/ WSDESIGN MONTH, STIMULUS
/ WSDESIGN / DESIGN SEX.
? There are six dependent variables, corresponding to three months and two different levels of stimulus.
? The dependent variables are named on the MANOVA variable list in such an order that the level of stimulus varies more rapidly than the month. Thus, STIMULUS is named last on the WSFACTORS subcommand.
? The first WSDESIGN subcommand specifies only the main effects for within- subjects factors. There is no MONTH by STIMULUS interaction term.
? The second WSDESIGN subcommand has no specifications and, therefore, invokes the default within- subjects design, which includes the main effects and their interaction.
We can use MWITHIN on either the WSDESIGN or the DESIGN subcommand in a model with both between- and within- subjects factors to estimate simple effects for factors nested within factors of the opposite type.
Example
MANOVA WEIGHT1 WEIGHT2 BY TREAT( 1,2)
/ WSFACTORS= WEIGHT( 2)
/ DESIGN= MWITHIN TREAT( 1) MWITHIN TREAT( 2) MANOVA WEIGHT1 WEIGHT2 BY TREAT( 1,2)
/ WSFACTORS= WEIGHT( 2)
/ WSDESIGN= MWITHIN WEIGHT( 1) MWITHIN WEIGHT( 2)
/ DESIGN.
? The first DESIGN tests the simple effects of WEIGHT within each level
? The second DESIGN tests the simple effects of TREAT within each level of WEIGHT.
Example
MANOVA TEMP1 TO TEMP6, WEIGHT1 TO WEIGHT6 BY GROUP( 1,2)
/ WSFACTORS= DAY( 3) AMPM( 2)
/ MEASURE= TEMP WEIGHT
/ WSDESIGN= DAY, AMPM, DAY BY AMPM
/ PRINT= SIGNIF( HYPOTH AVERF)
/ DESIGN.
? There are 12 dependent variables: 6 temperatures and 6 weights, corresponding to morning and afternoon measurements on three days.
? WSFACTORS identifies the two factors ( DAY and AMPM) that distinguish the temperature and weight measurements for each subject. These factors define six within- subjects cells.
? MEASURE indicates that the first group of six dependent variables correspond to TEMP and the second group of six dependent variables correspond to WEIGHT.
? These labels, TEMP and WEIGHT, are used on the output requested by PRINT.
? WSDESIGN requests a full factorial within- subjects model. Because this is the default, WSDESIGN could have been omitted.
Example
MANOVA LOW1 LOW2 LOW3 HI1 HI2 HI3
/ WSFACTORS= LEVEL( 2) TRIAL( 3)
/ CONTRAST( TRIAL)= DIFFERENCE
/ RENAME= CONST LEVELDIF TRIAL21 TRIAL312 INTER1 INTER2
/ PRINT= TRANSFORM
/ DESIGN.
? This analysis has two within- subjects factors and no between- subjects factors.
? Difference contrasts are requested for TRIAL, which has three levels.
? Because all orthonormal contrasts produce the same F test for a factor with two levels, there is no point in specifying a contrast type for LEVEL.
? New names are assigned to the transformed variables based on the transformation matrix. These names correspond to the meaning of the transformed variables: the mean or constant, the average difference between levels, the average effect of trial 2 compared to 1, the average effect of trial 3 compared to 1 and 2; and the two interactions between LEVEL and TRIAL.
扫码加好友,拉您进群



收藏
