Thursday, 15 July 2010

r - Specify error as interaction between block and treatment -


Programmers,

I am trying to specify in R that interaction of error word in AOV Is Block and My Cure Can You Help Me? I have created an example below.

-Rick

  d < - data.frame ("a" = as.factor (representative (1: 3, 12)), "b" = a.factor (representative (1: 3, every = 3)), "block" = like. (Representative (1: 4, each = 9))); D $ y & lt; - as.numeric (d $ a) * rnorm (36, mean = .75, sd = 1) + as.numeric (d $ b) * rnorm (36, mean = 1.2, sd = 1) + As.numeric ( D $ block) * rnorm (36, mean = 1.2, sd = 1) + rnorm (36); Anova1 = aov (y * a + b + error (a * b * block), data = d) summary (anova1)  

I did the above but there was no P-value in my output :

  Error: A DF amount Sq Pisces square one 2 50.38 25.19 Error: BDF amount Sq Pisces square B2 16.61 8.307 Error: Block DF amount Sq mean square F value P (& gt ; F) Residual 3 138.2 46.06 Error: A: BDF Sum class Mequa square F value value (F) Residual 4 46.3 9 11.6 Error: A: Block DF Sum class Mequa square F value Price (& gt; F) Residual 6 69.71 11.62 Error: B: Block DF Sum class MEQ squared F value P (F) Residual 6 110 18.33 Error: A: B: Block DF Sum class MEQ square F value As a help for residual 12 28 9.5 24.12  < summary.aov , P-values ​​are returned only "if there are non zero residual degrees of independence . " This is understandable, because with residual DF, no randomness has been left to guess in the model. 

Your model is 'completely saturated', which means that there is no replication within the combination of factor level, which attempts to guess it. See for further discussion.

To diagnose this problem in your data, try the code below that indicates that each block / A * B combination has only one overview:

  & Gt; Xtabs (~ a + b + block, d), block = 1 ba 1 2 3 1 1 1 1 2 1 1 1 3 1 1 1, block = 2 ba 1 2 3 1 1 1 1 2 1 1 1 3 1 1 1, Block = 3 BA 1 2 3 1 1 1 1 2 1 1 1 3 1 1 1, Block = 4 BA 1 2 3 1 1 1 1 2 1 1 1 3 1 1 1  

No comments:

Post a Comment