[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 11:43:37 CET 2020


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> 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>
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, data = hsb, weights = varIdent(form = ~1 |female))

        [[alternative HTML version deleted]]

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



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