Skip to content

[OFF] Nested or not nested, this is the question.

3 messages · Peter Dalgaard, Ronaldo Reis Jr.

#
Hi,

sorry by this off.

I'm still try to understand nested design.

I have the follow example (fiction):

I have 12 plots in 4 sizes in 3 replicates (4*3 = 12)
In each plot I put 2 species (A and B) to reproduce.
After a period I make samples in each board and count the number of 
individuals total (tot) and individuals A and B (nsp). Others individuals 
excepts A and B are in total of individuals.

This make a dataset with the 24 lines and not 12. Its smell pseudoreplication 
in a nested design, OK?

I need to know:

the species are different in proportion?

the size affect the species's proportion?

existe interaction between size and species?

I make the analysis.
numDF denDF  F-value p-value
(Intercept)     1    16 374.7121  <.0001
size            1     2  37.8683  0.0254
specie          1     2  18.2036  0.0508
size:specie     1     2   9.3203  0.0926
This is the correct mean to make this analysis?

or
numDF denDF  F-value p-value
(Intercept)     1    10 579.8853  <.0001
size            1    10  58.6030  <.0001
specie          1    10  59.5235  <.0001
size:specie     1    10  30.4760   3e-04
or neither?

I know about the distribution (binomial in this case), but I try to understand 
the nested design.

Thanks for any help.

The dataset is:

   plot size specie nsp tot
1     1   10      A   2  20
2     1   10      B   6  20
3     5   10      A   3  20
4     5   10      B   5  20
5     9   10      A   1  20
6     9   10      B   4  20
7     2   20      A   5  20
8     2   20      B   8  20
9     6   20      A   6  20
10    6   20      B   9  20
11   10   20      A   4  20
12   10   20      B   6  20
13    3   30      A   8  20
14    3   30      B   9  20
15    7   30      A   9  20
16    7   30      B  10  20
17   11   30      A   7  20
18   11   30      B   8  20
19    4   40      A  10  20
20    4   40      B   9  20
21    8   40      A   9  20
22    8   40      B  10  20
23   12   40      A   9  20
24   12   40      B   9  20
#
"Ronaldo Reis Jr." <chrysopa at insecta.ufv.br> writes:
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)

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

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

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))
#
Em Qua 09 Abr 2003 17:03, Peter Dalgaard BSA escreveu:

Peter,

thank for your exaplanation. But I still have doubt.
In this case size is quantitative, measurement in meter.
species is one DF because is a two level factor.
Ok, I understande this
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?
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