Message-ID: <40C6C841.1080200@adelaide.edu.au>
Date: 2004-06-09T08:20:17Z
From: David J. Netherway
Subject: Specifying xlevels in effects library
library(effects)
mod <- lm(Measurement ~ Age + Sex, data=d)
e <-effect("Sex",mod)
The effect is evaluated at the mean age.
> e
Sex effect
Sex
F M
43.33083 44.48531
>
> e$model.matrix
(Intercept) Age SexM
1 1 130.5859 0
23 1 130.5859 1
To evaluate the effect at Age=120 I tried:
e <-effect("Sex",mod,xlevels=list(Age=c(120)))
but the effect was still evaluated at 130.5859.
Is this an incorrect usage of xlevels?
Thanks, David