egf-class | R Documentation |
egf
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.
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
and windows
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 in call[["select_windows"]]
.
windows
, the model frames listed in parameters
,
and extra
all correspond rowwise.
priors
a list of the form list(top, bottom = list(beta, theta, Sigma))
,
where top
, beta
, theta
, and Sigma
are all
lists of egf_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 if control[["profile"]] = TRUE
)
all elements of segment beta
(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)
, where fixed
and random
are data frames preserving interpretive information
about fixed and random effect coefficients.
contrasts
a list of the form list(fixed, random)
, where fixed
and random
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 function update
.
An estimated model is specified by a bottom level parameter vector that is the concatenation of three segments:
beta
the result of unlist(lbeta)
, where lbeta
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 by
egf_top(model)
.
theta
the result of unlist(ltheta)
, where ltheta
is a list
of numeric vectors of random effect covariance parameters,
with one vector for each distinct random effect term in
formula_parameters
.
Each vector parametrizes a random effect covariance matrix via
theta2cov
and its inverse cov2theta
.
The list Sigma
mentioned in the description of egf
argument formula_priors
is precisely
lapply(ltheta, theta2cov)
.
b
the result of unlist(lb)
, where lb
is a list
of numeric matrices of scaled random effect coefficients,
corresponding elementwise to ltheta
.
The columns of lb[[i]]
(one per level of the grouping variable)
are interpreted as samples from a zero mean, unit variance multivariate
normal distribution with covariance matrix
cov2cor(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.
methods(class = "egf")
help.search("\\.egf$", fields = "alias", package = "epigrowthfit")
## less verbosely: alias??`\\.egf$`
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.