egf-class {epigrowthfit} | R Documentation |
Description of Objects of Class egf
Description
Class egf
designates models estimated by function egf
.
Objects of this class hold information about an estimated model.
Components can be accessed directly. However, as the components
are subject to change without notice, portable code will rely on
exported methods for interrogation.
Details
Currently, a legitimate egf
object is a list with elements:
model
-
a copy of the so-named argument of
egf
. frame
-
a list of the form
list(ts, windows, parameters, extra)
.ts
andwindows
are data frames preserving time series and fitting window endpoints.parameters
is a list of mixed effects model frames, with one element for each top level nonlinear model parameter.extra
is a data frame preserving additional variables specified incall[["select_windows"]]
.windows
, the model frames listed inparameters
, andextra
all correspond rowwise. priors
-
a list of the form
list(top, bottom = list(beta, theta, Sigma))
, wheretop
,beta
,theta
, andSigma
are all lists ofegf_prior
objects. control
-
a copy of the so-named argument of
egf
. tmb_out
-
the list output of
MakeADFun
. optimizer_out
-
the list output of the optimizer specified by
control[["optimizer"]]
. init, best
-
numeric vectors giving the values of the condensed bottom level parameter vector used in the first and maximal likelihood evaluations.
random
-
a logical vector indexing the elements of the condensed bottom level parameter vector that are not arguments of the negative log marginal likelihood function. It indexes all elements of segment
b
(random effect coefficients) and (but only ifcontrol[["profile"]] = TRUE
) all elements of segmentbeta
(fixed effect coefficients). value, gradient
-
numeric vectors giving the value and gradient of the negative log marginal likelihood function at
best[!random]
. hessian
-
a logical flag indicating whether the Hessian matrix of the negative log marginal likelihood function is positive definite at
best[!random]
.NA
means that the matrix has not been computed. coefficients
-
a list of the form
list(fixed, random)
, wherefixed
andrandom
are data frames preserving interpretive information about fixed and random effect coefficients. contrasts
-
a list of the form
list(fixed, random)
, wherefixed
andrandom
are lists preserving contrasts used to construct the fixed and random effects design matrices. call
-
the call to
egf
, enabling updates to the object by the default method of generic functionupdate
.
Bottom Level Parameter Vector
An estimated model is specified by a bottom level parameter vector that is the concatenation of three segments:
beta
-
the result of
unlist(lbeta)
, wherelbeta
is a list of numeric vectors of fixed effect coefficients, with one vector for each top level nonlinear model parameter. The order of top level parameters is specified byegf_top(model)
. theta
-
the result of
unlist(ltheta)
, whereltheta
is a list of numeric vectors of random effect covariance parameters, with one vector for each distinct random effect term informula_parameters
. Each vector parametrizes a random effect covariance matrix viatheta2cov
and its inversecov2theta
.
The listSigma
mentioned in the description ofegf
argumentformula_priors
is preciselylapply(ltheta, theta2cov)
. b
-
the result of
unlist(lb)
, wherelb
is a list of numeric matrices of scaled random effect coefficients, corresponding elementwise toltheta
. The columns oflb[[i]]
(one per level of the grouping variable) are interpreted as samples from a zero mean, unit variance multivariate normal distribution with covariance matrixcov2cor(theta2cov(ltheta[[i]]))
.
When elements of this vector are “mapped” via egf
argument map
, likelihood is defined as a function of the condensed
vector that excludes mapped elements.
Methods are defined for generic functions
coef
,
fixef
, and
ranef
to allow users to interrogate the structure of the vector.
Examples
methods(class = "egf")
help.search("\\.egf$", fields = "alias", package = "epigrowthfit")
## less verbosely: alias??`\\.egf$`