楼主: SPSSCHEN
7898 43

[问答] [讨论]Manova in SPSS by Programming [推广有奖]

11
Multivariate 发表于 2006-5-21 12:39:00

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.

12
Multivariate 发表于 2006-5-21 12:44:00

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

13
Multivariate 发表于 2006-5-21 12:47:00

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.

14
Multivariate 发表于 2006-5-21 12:48:00

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.

15
Multivariate 发表于 2006-5-21 12:50:00

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.

16
Multivariate 发表于 2006-5-21 12:53:00

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).

17
Multivariate 发表于 2006-5-21 12:54:00

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.

18
Multivariate 发表于 2006-5-21 12:57:00

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编辑过]

19
Multivariate 发表于 2006-5-21 13:02:00

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.

20
Multivariate 发表于 2006-5-21 13:09:00

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.

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 04:19