Retrieves fitted values of top level nonlinear model parameters. The fitted value of a given parameter for a given fitting window is obtained by adding (i) the population fitted value computed as a linear combination of fixed effect coefficients and (ii) all applicable random effects, with random effects set equal to their conditional modes.
# S3 method for egf
fitted(object,
top = egf_top(object), subset = NULL, select = NULL,
class = FALSE, se = FALSE, ...)# S3 method for fitted.egf
confint(object, parm = seq_len(nrow(object)), level = 0.95,
class = FALSE, ...)
A numeric matrix containing fitted values.
Users can pass class = TRUE to obtain an augmented result.
Thus, alternatively:
A data frame inheriting from class fitted.egf, with variables:
top level nonlinear model parameter, from
egf_top(object).
time series, from
levels(model.frame(object)[["ts"]]).
fitting window, from
levels(model.frame(object)[["window"]]).
fitted value.
approximate delta method standard error (only if requested).
further variables from
model.frame(object, "combined")
specified by argument select.
an egf or fitted.egf object.
a subset of egf_top(object) naming top level
nonlinear model parameters whose fitted values should be
retrieved.
index vectors for the rows and columns of
model.frame(object, "combined") or language objects
evaluating to such vectors.
subset indicates fitting windows for which fitted values
should be retrieved; the default indicates all.
select indicates variables that should be appended to
the result; the default indicates none.
Evaluation of language objects follows the implementation of
subset.data.frame.
a logical. If TRUE, then the value of the method call
is a fitted.egf or confint.egf object,
not a matrix.
a logical. If TRUE and if class = TRUE,
then the result is augmented with approximate delta method
standard errors.
additional arguments passed from or to other methods.
a valid index vector for the rows of object indicating a subset
of the fitted values.
a number in the interval \((0,1)\) indicating a confidence level.
The generic function fitted.
# \donttest{
example("egf", package = "epigrowthfit")
zz <- fitted(m1, class = TRUE, se = TRUE)
str(zz)
confint(zz, class = TRUE)
# }
Run the code above in your browser using DataLab