Date: Tue, 27 Sep 2005 18:42:45 +0200
Reply-To: Marta García-Granero
<biostatistics@terra.es>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Marta García-Granero
<biostatistics@terra.es>
Organization: Asesoría Bioestadística
Subject: Oneway nested ANOVA & a Split-plot example (for Carlos Arce)
Content-Type: text/plain; charset=ISO-8859-15
Hi Carlos
These examples might help you
* One factor nested ANOVA *.
* Inside factor "itype", 4 cages (with 4 rats each one) are nested *.
* Dataset *.
DATA LIST FREE/itype cage activ (3 F4.0).
BEGIN DATA
1 1 3 1 1 6 1 1 3 1 1 3 1 2 1 1 2 2 1 2 2 1 2 2
1 3 5 1 3 6 1 3 5 1 3 6 1 4 2 1 4 3 1 4 4 1 4 3
2 1 7 2 1 8 2 1 7 2 1 6 2 2 4 2 2 5 2 2 4 2 2 3
2 3 7 2 3 8 2 3 9 2 3 8 2 4 10 2 4 10 2 4 9 2 4 11
END DATA.
VAR LABEL itype 'Type of ionization' /activ 'Level of activity'.
VALUE LABEL itype 1'Positive' 2'Negative'.
(A) Using UNIANOVA:
ANALYZE: GENERAL LINEAR MODEL: UNIVARIATE:
- Dependent variable: activ
- Fixed factor: itype
- Random factor: cage
- PASTE (don't click "OK").
The resulting syntax will be:
UNIANOVA
activ BY itype cage
/RANDOM = cage
/METHOD = SSTYPE(3)
/INTERCEPT = INCLUDE
/CRITERIA = ALPHA(.05)
/DESIGN = itype cage itype*cage .
Last line has to be modified for 2 reasons:
- Eliminate the interaction term
- Add nesting effect
* Also, some lines are just the default options, and need not be present *.
UNIANOVA
activ BY itype cage
/RANDOM = cage
/DESIGN = itype cage(itype).
RUN: ALL.
(B) Using MIXED:
ANALYZE: MIXED MODELS: LINEAR.
- Click CONTINUE
- Dependent variable: activ
- Factor(s): itype cage
- FIXED: itype. ADD. CONTINUE
- RANDOM: Select "Build nested terms" and build (using buttons): "cage(itype)"
(sorry but I'm unable to explain it with more detail, just play with the mouse)
ADD. CONTINUE.
- OK.
This the corresponding syntax (after eliminating some lines, as before):
MIXED
activ BY itype cage
/FIXED = itype | SSTYPE(3)
/METHOD = REML
/RANDOM cage(itype) | COVTYPE(VC) .
*********************************************************************************
* Split-plot example (taken from Irristat 4.4 manual):
* http://www.irri.org/science/software/irristat.asp
* RESPONSE OF MAIZE TO NITROGEN FERTILIZER
* WHEN IT IS GROWN AFTER DIFFERENT CROPS
* TALLEYRAND, H. NCRE CEREALS AGRONOMIST, IRA/GAROUA
* THE TRIAL WAS A SPLIT PLOT DESIGN WITH PRECEEDING CROP AS
* MAIN PLOT FACTOR AND FOUR LEVELS OF NITROGEN AS SUB-PLOT
* FACTOR: 0, 45, 90, 135 KG N/ha. MAIZE VARIETY CMS8501.
* Dataset *.
DATA LIST FREE/block pcrop nitrogen (3 F4.0) yield (F4.2).
BEGIN DATA
1 5 1 2.35 1 5 2 3.29 1 5 3 4.75 1 5 4 6.39 1 1 1 3.76 1 1 2 5.17
1 1 3 6.30 1 1 4 6.82 1 3 1 2.26 1 3 2 5.17 1 3 3 5.88 1 3 4 6.82
1 2 1 3.71 1 2 2 4.70 1 2 3 5.88 1 2 4 6.20 1 4 1 1.41 1 4 2 3.48
1 4 3 4.61 1 4 4 4.70 2 5 1 4.20 2 5 2 5.23 2 5 3 6.64 2 5 4 6.73
2 1 1 5.28 2 1 2 5.84 2 1 3 6.36 2 1 4 7.39 2 3 1 3.49 2 3 2 5.84
2 3 3 6.88 2 3 4 6.78 2 2 1 4.85 2 2 2 5.98 2 2 3 6.73 2 2 4 7.49
2 4 1 3.12 2 4 2 3.59 2 4 3 4.67 2 4 4 6.50 3 5 1 5.34 3 5 2 6.79
3 5 3 7.31 3 5 4 8.20 3 1 1 6.75 3 1 2 8.11 3 1 3 8.30 3 1 4 8.91
3 3 1 4.26 3 3 2 7.17 3 3 3 7.59 3 3 4 8.34 3 2 1 5.57 3 2 2 5.81
3 2 3 6.23 3 2 4 7.69 3 4 1 4.49 3 4 2 5.67 3 4 3 6.93 3 4 4 7.17
4 5 1 3.38 4 5 2 3.85 4 5 3 5.17 4 5 4 5.36 4 1 1 4.18 4 1 2 5.88
4 1 3 6.30 4 1 4 7.14 4 3 1 2.82 4 3 2 4.61 4 3 3 5.73 4 3 4 5.88
4 2 1 4.47 4 2 2 5.17 4 2 3 5.73 4 2 4 6.34 4 4 1 2.73 4 4 2 3.06
4 4 3 4.70 4 4 4 5.36
END DATA.
VALUE LABEL pcrop 1'PPEAS' 2'CROTL' 3'GNUTS' 4'CWPEA' 5'MAIZE'.
VALUE LABEL nitrogen 1'0' 2'45' 3'90' 4'135'.
* I'll use the syntax (not trying to explain the steps in the P&C interface) *
UNIANOVA
yield BY block pcrop nitrogen
/RANDOM = block
/METHOD = SSTYPE(3)
/INTERCEPT = EXCLUDE
/TEST= pcrop vs block*pcrop
/DESIGN = pcrop block block*pcrop nitrogen pcrop*nitrogen .
As you can see, syntax is needed, unless you want to try Irristat 4.4,
a freeware program specifically designed to work with complex
agricultural ANOVA models.
Hope this helps you
Marta Garcia-Granero, PhD
Statistician