fitted.egf {epigrowthfit}R Documentation

Fitted Values

Description

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.

Usage

## S3 method for class 'egf'
fitted(object,
       top = egf_top(object), subset = NULL, select = NULL,
       class = FALSE, se = FALSE, ...)

## S3 method for class 'fitted.egf'
confint(object, parm = seq_len(nrow(object)), level = 0.95,
        class = FALSE, ...)

Arguments

object

an egf or fitted.egf object.

top

a subset of egf_top(object) naming top level nonlinear model parameters whose fitted values should be retrieved.

subset, select

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.

class

a logical. If TRUE, then the value of the method call is a fitted.egf or confint.egf object, not a matrix.

se

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.

parm

a valid index vector for the rows of object indicating a subset of the fitted values.

level

a number in the interval (0,1) indicating a confidence level.

Value

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

top level nonlinear model parameter, from egf_top(object).

ts

time series, from levels(model.frame(object)[["ts"]]).

window

fitting window, from levels(model.frame(object)[["window"]]).

value

fitted value.

se

approximate delta method standard error (only if requested).

...

further variables from model.frame(object, "combined") specified by argument select.

See Also

The generic function fitted.

Examples


example("egf", package = "epigrowthfit")

zz <- fitted(m1, class = TRUE, se = TRUE)
str(zz)

confint(zz, class = TRUE)


[Package epigrowthfit version 0.15.3 Index]