[R] se.contrast

Don Driscoll Don.Driscoll at flinders.edu.au
Tue Feb 24 07:05:53 CET 2004


I'm fitting a simple one-way nested anova and would like to obtain standard 
errors or confidence limits.  I'm using se.contrast to try to get se for 
the contrast between the two levels of the main effect, but I get an error 
message (see below).  What is going on?


 > shp<-factor(rep(c("reserve","strip"),each=96))
 > site<-factor(rep(c("1g","1p", 
 > pit<-factor(rep(1:16,12))
 > ddata<-data.frame(shp,pit,site,reptsp)
 > #Fit a Standard Nested Anova Model
 > repmod1<-aov(reptsp~shp/site/pit+ Error(shp/site/pit))
 > summary(repmod1)

Error: shp
     Df Sum Sq Mean Sq
shp  1  53.13   53.13

Error: shp:site
          Df Sum Sq Mean Sq
shp:site 10 61.885   6.189

Error: shp:site:pit
               Df Sum Sq Mean Sq
shp:site:pit 180 318.56    1.77
 > se.contrast(repmod1, list(shp=="strip", shp=="reserve"),data=ddata)
Error in rep.int(n.object - 1, nrow(c.qr) - length(e.assign)) :
         invalid number of copies in "rep"

More information about the R-help mailing list