[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 17:59:05 CET 2019


Hi Bert,

 

If the statistical reason is off topic here, do you have a suggestion of a better forum?

 

Thanks,

 

Bill

 

From: Bert Gunter <bgunter.4567 using gmail.com> 
Sent: Tuesday, November 19, 2019 11:52 AM
To: bill using denney.ws
Cc: R-help <r-help using r-project.org>
Subject: Re: [R] Why does nlme::getVarCov not Work for nlme Models?

 

1. The Help page for getVarCov says that it supports lme and gls models only. So not nonlinear models. As to why it does not, that is off topic here, as that is a statistical question.

 

2. As this is longstanding, it almost certainly has good reason for being there, so I would seriously doubt it. But of course I don't speak for R Core. 

 

Cheers,

Bert

 

On Mon, Nov 18, 2019 at 9:43 PM <bill using denney.ws <mailto:bill using denney.ws> > wrote:

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]]

______________________________________________
R-help using r-project.org <mailto:R-help using r-project.org>  mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


	[[alternative HTML version deleted]]



More information about the R-help mailing list