[R] se.contrast ???????????

Duncan Mackay Duncan.Mackay at flinders.edu.au
Thu Feb 26 02:02:23 CET 2004


Hi all,

Just to follow up Don Driscoll's earlier post, can anyone please explain
why "se.contrast" fails here??

> shp<-factor(rep(c("reserve","strip"),each=96))
> 
> 
>
site<-factor(rep(c("1g","1p","1t","2g","2p","2t","3g","3p","3t","4g","4p
","4t"),each=16))
> 
> pit<-factor(rep(1:16,12))
> 
>
reptsp<-c(4,5,6,4,6,6,6,7,3,5,2,2,4,8,5,4,2,4,2,2,4,5,2,4,4,4,3,2,3,2,5,
3,5,3,4,4,4,3,4,
+
3,4,4,4,3,4,3,6,3,3,5,4,6,4,4,2,4,2,6,5,5,5,7,4,4,5,1,4,5,6,5,5,2,6,3,5,
6,4,5,
+
4,8,2,4,2,4,2,4,3,3,4,4,3,2,1,3,4,4,2,2,3,2,4,1,2,2,3,4,5,5,3,5,5,4,1,1,
2,1,3,
+
1,4,1,6,1,2,3,2,2,2,1,1,2,2,6,5,3,2,3,5,3,2,3,2,1,3,2,4,4,3,3,3,1,2,4,3,
4,5,6,
+
5,2,3,2,2,5,5,5,2,2,5,2,4,4,3,2,2,3,2,2,2,2,5,4,3,3,5,2,5,4,3,2,2,2,1,2)
> 
> ddata<-data.frame(shp,pit,site,reptsp)
> 
> repmod2<-aov(reptsp~shp/site+ Error(shp/site))
> summary(repmod2)

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: Within
           Df Sum Sq Mean Sq F value Pr(>F)
Residuals 180 318.56    1.77               
> 
> table(ddata$shp)

reserve   strip 
     96      96 
> 
> se.contrast(repmod2, list(shp=="strip", shp=="reserve"),data=ddata)
Error in qr.qty(strata$qr, scontrast) : qr and y must have the same
number of rows
> 
?????????????????????

Thanks,
Duncan

**********************************************

R, me bucko

*****************************************
Dr. Duncan Mackay
School of Biological Sciences
Flinders University
GPO Box 2100
Adelaide
S.A.    5001
AUSTRALIA

Ph (08) 8201 2627    FAX (08) 8201 3015

http://www.scieng.flinders.edu.au/biology/people/mackay_d/index.html




More information about the R-help mailing list