View source: R/information-matrices.R
| Fisher_info | R Documentation | 
Calculates the expected, observed, or average Fisher information matrix from a fitted linear mixed effects model (lmeStruct object) or generalized least squares model (glsStruct object).
Fisher_info(mod, type = "expected", separate_variances = FALSE)
mod | 
 Fitted model of class lmeStruct or glsStruct.  | 
type | 
 Type of information matrix. One of   | 
separate_variances | 
 Logical indicating whether to return the Fisher
information matrix for separate level-1 variance components if using
  | 
Information matrix corresponding to variance component parameters of
mod.
If separate_variances = TRUE and if weights = varIdent(form =
  ~ 1 | Stratum) is specified in the model fitting, the Fisher information
matrix for separate level-1 variance estimates will be returned. If
separate_variances = TRUE but if the weighting structure is not
specified with varIdent, or if separate_variances = FALSE,
then the Fisher information matrix for the default variance components will
be returned.
library(nlme)
data(Bryant2016)
Bryant2016_RML <- lme(fixed = outcome ~ treatment,
                      random = ~ 1 | school/case,
                      correlation = corAR1(0, ~ session | school/case),
                      data = Bryant2016)
Fisher_info(Bryant2016_RML, type = "expected")
Fisher_info(Bryant2016_RML, type = "average")
Bryant2016_RML2 <- lme(fixed = outcome ~ treatment,
                      random = ~ 1 | school/case,
                      correlation = corAR1(0, ~ session | school/case),
                      weights = varIdent(form = ~ 1 | treatment),
                      data = Bryant2016)
Fisher_info(Bryant2016_RML2, separate_variances = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.