[R] Specifying xlevels in effects library [2]

John Fox jfox at mcmaster.ca
Thu Jun 10 03:54:18 CEST 2004


Dear David,

An addendum: Looking at my original posting, I see that failing to specify a
list as the xlevels argument was my error.

Sorry,
 John

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of David 
> J. Netherway
> Sent: Wednesday, June 09, 2004 8:27 PM
> To: R-help at stat.math.ethz.ch
> Subject: Re: [R] Specifying xlevels in effects library
> 
> Andy and John,
> 
> I looked at typical when xlevels did not work but when I saw 
> that it was a function I went no further. Setting the 
> function to a constant was a good idea.
> John's method seems to require that I change the model:
> 
>  > eff <-effect("sex*age",mod,xlevel=(Age=c(120,120)))
> Error in all(!(factors[, term1] & (!factors[, term2]))) : 
>         subscript out of bounds
> In addition: Warning message: 
> sex:age does not appear in the model in: effect("sex*age", 
> mod, xlevel = (age = c(120, 120))) 
> 
> Andy's method works as suggested for this simple case.
> 
> Thanks for your time.
> 
> Cheers, David
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html




More information about the R-help mailing list