[R] Why does nlme::getVarCov not Work for nlme Models?
biii m@iii@g oii de@@ey@ws
biii m@iii@g oii de@@ey@ws
Tue Nov 19 03:50:48 CET 2019
Hi,
I was just trying to summarize an nlme model using `broom.mixed::tidy()`,
and it doesn't give random effects or residual variability for nlme models.
As I looked deeper, this appears to be related to the fact that
`nlme::getVarCorr()` doesn't support nlme models for no reason that I can
discern [1]. I do see that it simply has a `stop()` call if the model is
nlme, but I don't know or see a commented reason why this would be.
I can imagine that in a nonlinear model the interpretation of variance is
different than in a linear model (namely that it is more likely to be
asymmetric and this result is asymptotic), but that doesn't seem like a
reason to prevent the use of the tool. When I pretended that my model was
an lme model (set the class temporarily to "lme"), it gave the expected
result.
My questions are:
1. Why does nlme::getVarCorr() not support nlme models?
2. If there is not a known reason, does someone in R-core think that a
patch removing the stop below [1] would be accepted?
[1] https://svn.r-project.org/R-packages/trunk/nlme/R/VarCov.R the lines
are:
if(any("nlme" == class(obj)))
stop("not implemented for \"nlme\" objects")
Thanks,
Bill
[[alternative HTML version deleted]]
More information about the R-help
mailing list