Dear community, 

I'm trying to examine my grouped data following page 6
http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-mixed-models.pdf. 


I'm trying lmList this way: 

model.list <- lmList(log(v.dep) ~  log(v2) +log(v4) + v3 | v5, subset =
v6=0,  data=data)

and obtain this error message:  In Ops.factor(v4, v4) : | not meaningful for
factors


My original model is originalmodel <- lm(log(v.dep) ~  log(v2) +log(v4) + v3
+ v5+ v6,  data=data)  (The thing is that I don't know how to specify  that
groups are in v5, where to put in the lmList statement |v5)

By the way, following Fox pdf I was trying as well to group my data, as this
example: 

/attach(Bryk)
cat <- sample(unique(school[sector==’Catholic’]), 20)
Cat.20 <- groupedData(mathach ~ ses | school,  data=Bryk[is.element(school,
cat),])
pub <- sample(unique(school[sector==’Public’]), 20)
Pub.20 <- groupedData(mathach ~ ses | school, data=Bryk[is.element(school,
pub),])/

what am I doing wrong?

cat <- sample(unique(data$v5[v6=0,]), 20)

But Error in NextMethod("[") : first argument invalid


Find attached the data I'm working with.  
http://r.789695.n4.nabble.com/file/n4307083/data data 

Thanks in advance,  u...@host.com




--
View this message in context: 
http://r.789695.n4.nabble.com/examine-grouped-data-lmList-tp4307083p4307083.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to