[R-sig-ME] lme: count the number extra parameters estimated for variance or covariances

Harold Doran h@ro|d@dor@n @end|ng |rom c@mb|um@@@e@@ment@com
Sun Nov 1 16:25:32 CET 2020


I think you need to understand what a reproducible example is intended to do. Your data estimates a model and yields a fiitted model object. What parameter from that object using an extractor are you intending to find?

For example, a well posed question would be something like. I want to extract the fixed effects from a fitted model object. How do I get them?

To say I want the “parameters estimated for modeling residual variances” etc makes no sense. The parameters of a mixed model are the fixed effects and the marginal variances (and covariances) of the random effects.

So, specifically what parameters do you think exist in a model that you want?

From: Simon Harmel <sim.harmel using gmail.com>
Sent: Sunday, November 1, 2020 9:58 AM
To: Harold Doran <harold.doran using cambiumassessment.com>
Cc: r-sig-mixed-models <r-sig-mixed-models using r-project.org>
Subject: Re: [R-sig-ME] lme: count the number extra parameters estimated for variance or covariances

Dear Harold,

My question "specifically" is:  is there a way (e.g., via an extractor function) to obtain parameters estimated for modeling residual variances or covariances from an "lme" model?

For concreteness, please consider the reproducible model I provided in my original post in which a variance function has been used.

Thanks,


On Sun, Nov 1, 2020, 4:43 AM Harold Doran <harold.doran using cambiumassessment.com<mailto:harold.doran using cambiumassessment.com>> wrote:
In order to answer that you need to specify what "thing" you want. The object itself has many things and there are extractor functions to grab many of them. I say "thing" because the *parameters* of a mixed model are the fixed effects and the variance components. Random effects etc are not parameters of a mixed model.

You can always look at the structure of a fitted model object in R to see what things are generally in it.

-----Original Message-----
From: R-sig-mixed-models <r-sig-mixed-models-bounces using r-project.org<mailto:r-sig-mixed-models-bounces using r-project.org>> On Behalf Of Simon Harmel
Sent: Sunday, November 1, 2020 4:02 AM
To: r-sig-mixed-models <r-sig-mixed-models using r-project.org<mailto:r-sig-mixed-models using r-project.org>>
Subject: [R-sig-ME] lme: count the number extra parameters estimated for variance or covariances

External email alert: Be wary of links & attachments.


Hello All,

In addition to fixed and random effects, is there a way to extract how many other parameters (for modeling residual variances or covariances) an "lme()" object has estimated?

Here is a reproducible example:

library(nlme)

hsb <- read.csv('
https://raw.githubusercontent.com/rnorouzian/e/master/hsb.csv')
hsb$female <- as.factor(hsb$female)

fit <- lme(math ~ female, random = ~ 1|sch.id<http://sch.id>, data = hsb, weights = varIdent(form = ~1 |female))

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models using r-project.org<mailto:R-sig-mixed-models using r-project.org> mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list