mkParInds: Make parameter indices

Description Usage Arguments Details Value Examples

Description

One faces two somewhat opposing design goals when deciding on how to represent the parameters of structured generalized linear mixed models. On one hand, it would be nice to organize the representation in terms of the four different types of parameters (see below): (covar, fixef, loads, weigh). On the other hand, the nonlinear optimizer takes vector valued parameter sets. The mkParInds function is used to get the best of both worlds, by constructing a list of indices for extracting various types of parameters from a parameter vector.

Usage

1
mkParInds(parList)

Arguments

parList

named list of parameters with possible names (see details): (covar, fixef, loads, weigh)

Details

The lme4ord package keeps track of parameters using a simple named list of parameter vectors. The names correspond to different types of parameters, described in the following list:

covar

Parameters determining the transposed relative covariance factor, Lambdat.

fixef

The fixed effects coefficients.

loads

Parameters (called loadings) determining the random effects model matrix, Zt.

weigh

Parameters determining the observation weights (experimental).

mkParInds constructs the indices required to extract the different types of parameters in unlist(parList).

Value

A list with the same names as parList with the indices for each type of parameter.

Examples

1
2
3
4
5
set.seed(1)
parList <- list(covar = 1, fixef = c(0, 0), loads = rnorm(10))
parInds <- mkParInds(parList)
parVec <- unlist(parList)
parVec[parInds$fixef]

stevencarlislewalker/lme4ord documentation built on May 30, 2019, 4:43 p.m.