[R] lme questions
Christian Hennig
fm3a004 at math.uni-hamburg.de
Wed Aug 29 11:36:28 CEST 2001
Dear list,
the following should fit the model
log(PEPC.Wert)=fKTemp+fHerk+interaction(fKTemp,fHerk)+fMub+error,
where fKTemp, fHerk are fixed effect factors and fMub is a random effects
factor nested in fHerk (values are different fopr different values of
fHerk).
> logpepcr1 <- lme(log(PEPC.Wert) ~ fKTemp*fHerk, random= ~ 1 | fMub, na.action=na.omit)
The following should be without the random factor:
> logpepcr0 <- lme(log(PEPC.Wert) ~ fKTemp*fHerk,na.action=na.omit)
Error in getGroups.data.frame(dataMix, groups) :
Invalid formula for groups
OK, I try with lm:
> logpepcr0 <- lm(log(PEPC.Wert) ~ fKTemp*fHerk,na.action=na.omit)
...works.
Is the following correct for testing the significance of the
random factor?
> anova.lme(logpepcr0,logpepcr1)
Model df AIC BIC logLik Test L.Ratio p-value
logpepcr0 1 10 3977.354 4030.318 -1978.677
logpepcr1 2 11 3885.392 3943.653 -1931.696 1 vs 2 93.96144 <.0001
Where can I get an estimator for the variance of the random factor fMub?
Is there a way to specify an interaction between fMub and fKTemp?
And why does this happen?
> plot(logpepcr1)
Error in do.call(plotFun, as.list(args)) :
couldn't find function "xyplot"
(plot(logpepcr0) works; I use R 1.3.0 on Solaris.)
Thank you for help.
Christian
***********************************************************************
Christian Hennig
University of Hamburg, Faculty of Mathematics - SPST/ZMS
(Schwerpunkt Mathematische Statistik und Stochastische Prozesse,
Zentrum fuer Modellierung und Simulation)
Bundesstrasse 55, D-20146 Hamburg, Germany
Tel: x40/42838 4907, privat x40/631 62 79
hennig at math.uni-hamburg.de, http://www.math.uni-hamburg.de/home/hennig/
#######################################################################
ich empfehle www.boag.de
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list