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)

Arguments

mod

Fitted model of class lmeStruct or glsStruct.

type

Type of information matrix. One of "expected" (the default), "observed", or "average".

separate_variances

Logical indicating whether to return the Fisher information matrix for separate level-1 variance components if using varIdent function to allow for different variances per stratum. Default is FALSE.

Value

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.

Examples


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")
#>                             Tau.school.var((Intercept))
#> Tau.school.var((Intercept))                1.322701e-05
#> Tau.case.var((Intercept))                  3.481280e-06
#> cor_params                                 4.031958e-02
#> sigma_sq                                   2.034762e-06
#>                             Tau.case.var((Intercept))    cor_params
#> Tau.school.var((Intercept))              3.481280e-06  4.031958e-02
#> Tau.case.var((Intercept))                1.299375e-05  1.510332e-01
#> cor_params                               1.510332e-01  2.744557e+05
#> sigma_sq                                 7.536166e-06 -5.762687e+00
#>                                  sigma_sq
#> Tau.school.var((Intercept))  2.034762e-06
#> Tau.case.var((Intercept))    7.536166e-06
#> cor_params                  -5.762687e+00
#> sigma_sq                     1.320509e-04
Fisher_info(Bryant2016_RML, type = "average")
#>                             Tau.school.var((Intercept))
#> Tau.school.var((Intercept))                1.528840e-05
#> Tau.case.var((Intercept))                  3.168824e-06
#> cor_params                                 3.814212e-02
#> sigma_sq                                   1.829061e-06
#>                             Tau.case.var((Intercept))    cor_params
#> Tau.school.var((Intercept))              3.168824e-06  3.814212e-02
#> Tau.case.var((Intercept))                4.508868e-06  5.930354e-02
#> cor_params                               5.930354e-02  2.673951e+05
#> sigma_sq                                 2.619958e-06 -5.762462e+00
#>                                  sigma_sq
#> Tau.school.var((Intercept))  1.829061e-06
#> Tau.case.var((Intercept))    2.619958e-06
#> cor_params                  -5.762462e+00
#> sigma_sq                     1.320715e-04

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)
#>                             Tau.school.var((Intercept))
#> Tau.school.var((Intercept))                1.354534e-05
#> Tau.case.var((Intercept))                  3.853874e-06
#> cor_params                                 5.241303e-03
#> sigma_sq.baseline                          3.192872e-06
#> sigma_sq.treatment                        -6.827965e-07
#>                             Tau.case.var((Intercept))    cor_params
#> Tau.school.var((Intercept))              3.853874e-06  5.241303e-03
#> Tau.case.var((Intercept))                3.162009e-05  7.733113e-02
#> cor_params                               7.733113e-02  2.115804e+05
#> sigma_sq.baseline                        2.369386e-05 -2.095870e+00
#> sigma_sq.treatment                      -3.501822e-06 -3.798230e+00
#>                             sigma_sq.baseline sigma_sq.treatment
#> Tau.school.var((Intercept))      3.192872e-06      -6.827965e-07
#> Tau.case.var((Intercept))        2.369386e-05      -3.501822e-06
#> cor_params                      -2.095870e+00      -3.798230e+00
#> sigma_sq.baseline                1.319001e-04      -2.810345e-05
#> sigma_sq.treatment              -2.810345e-05       1.190946e-04