[R] [OFF] Nested or not nested, this is the question.
Ronaldo Reis Jr.
chrysopa at insecta.ufv.br
Thu Apr 10 15:40:30 CEST 2003
Em Qua 09 Abr 2003 17:03, Peter Dalgaard BSA escreveu:
Peter,
thank for your exaplanation. But I still have doubt.
> Neither. First of all, you have numDF = 1 for things that have more
> than two levels, so you forgot to make them factors.
>
> reis$plot<-factor(reis$plot)
> reis$size<-factor(reis$size)
> reis$specie<-factor(reis$specie)
In this case size is quantitative, measurement in meter.
species is one DF because is a two level factor.
> Then you seem to be needing something that describes the replication,
> and you're not actually telling us, but if I guess that plots 1-4 is
> the 1st replication and 5-8 and 9-12 are the others, then this should
> work:
>
> reis$repl <- factor((as.numeric(reis$plot)-1)%/%4+1)
> table(reis$plot,reis$repl) # just to check
Ok, I understande this
> now you can do
>
> anova(lme(nsp/tot~size*specie,random=~1|repl/plot,data=reis))
>
> and have
>
> numDF denDF F-value p-value
> (Intercept) 1 8 207.18935 <.0001
> size 3 6 94.58027 <.0001
> specie 1 8 57.14293 1e-04
> size:specie 3 8 10.28573 4e-03
Here is my problem to understand.
Why is repl/plot, or repl/size? plot is the high level.
Why is not repl/specie or plot/specie?
I think this because in each repl I have two measurement of specie.
Is like the rats example of Crawley's book. repl = rat, specie = liver and
size = treatment, in this case the nested design is size/repl/specie.
The diference is that liver in rat is a random effect but specie is a fixed
effect. In rats example it make a simple nested anova, but dnt have any
example to make a nested ancova. It is a bit confused.
If I dont have real replication (one plot by size), only pseudoreplication?
> or, as I'd prefer in a balanced study:
>
> summary(aov(nsp/tot~specie*size+Error(repl+plot),data=reis))
>
> Error: repl
> Df Sum Sq Mean Sq F value Pr(>F)
> Residuals 2 0.027708 0.013854
>
> Error: plot
> Df Sum Sq Mean Sq F value Pr(>F)
> size 3 0.305417 0.101806 94.58 1.927e-05 ***
> Residuals 6 0.006458 0.001076
> ---
> Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
>
> Error: Within
> Df Sum Sq Mean Sq F value Pr(>F)
> specie 1 0.041667 0.041667 57.143 6.551e-05 ***
> specie:size 3 0.022500 0.007500 10.286 0.00404 **
> Residuals 8 0.005833 0.000729
> ---
> Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
>
> (Error(repl/plot) actually works too because repl:plot is the same as plot)
>
> This gets a little confusin because "repl" is a coarsening of "plot".
> It may be easier with a within-repl numbering, which you can get by
> noting that plot is equivalent to repl:size
>
> anova(lme(nsp/tot~size*specie,random=~1|repl/size,data=reis))
> summary(aov(nsp/tot~specie*size+Error(repl/size),data=reis))
This example (create by me) is a manipulative example, but I try to understand
this for use with ecological "exploratory" data. In this case I only collect
the data, normally I can not manipulate (create) the "design". All book's
examples are perfectly data with tradicional design, its ease to understand.
Any help still welcome.
Please dont say "Read the book ..." I dont have money for books at the moment,
sorry.
Thanks for all
Ronaldo
--
APL is a write-only language. I can write programs in APL, but I can't
read any of them.
-- Roy Keir
--
| // | \\ [*****************************][*******************]
|| ( õ õ ) [Ronaldo Reis Júnior ][PentiumIII-600 ]
| V [UFV/DBA-Entomologia ][HD: 30 + 10 Gb ]
|| / \ [36571-000 Viçosa - MG ][RAM: 128 Mb ]
| /(.''`.)\ [Fone: 31-3899-2532 ][Video: SiS620-8Mb ]
||/(: :' :)\ [chrysopa at insecta.ufv.br ][Modem: Pctel-onboar]
|/ (`. `'` ) \[ICQ#: 5692561 ][Kernel: 2.4.18 ]
|| ( `- ) [*****************************][*******************]
||| _/ \_Powered by GNU/Debian W/Sarge D+ || Lxuser#: 205366
More information about the R-help
mailing list