[R] Specifying xlevels in effects library

David J. Netherway david.netherway at adelaide.edu.au
Thu Jun 10 03:27:15 CEST 2004


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




More information about the R-help mailing list