[R] Linear model without an intercept
Gang Chen
gangchen at mail.nih.gov
Tue Jul 31 22:05:52 CEST 2007
I would like to run a regression analysis without a constant
(intercept) or a special one-way within-subject (repeated-measures)
ANOVA. I'm not sure if the following command lines are correct or not:
m1 <- lme(Resp ~ Cond - 1, random = ~ Cond - 1 | Subj, TestData)
or,
m2 <- lmer(Resp ~ Cond - 1 +( Cond - 1 | Subj), TestData)
Also I notice that both lme and lmer provide the correlation matrix
of the fixed effects. So if there are more than 2 levels in the fixed
effect of condition (Cond), how can I correct for sphericity
violation in lme and lmer if I want to get an F test for condition
effect?
Thanks,
Gang
More information about the R-help
mailing list