Skip to contents

Augmented Prediction for nlmixr2 fit

Usage

nlmixr2AugPredSolve(
  fit,
  covsInterpolation = c("locf", "nocb", "linear", "midpoint"),
  minimum = NULL,
  maximum = NULL,
  length.out = 51L,
  ...
)

# S3 method for class 'nlmixr2FitData'
augPred(
  object,
  primary = NULL,
  minimum = NULL,
  maximum = NULL,
  length.out = 51,
  ...
)

Arguments

fit

Nlmixr2 fit object

covsInterpolation

covariate interpolation; by default the one the fit was estimated with

minimum

an optional lower limit for the primary covariate. Defaults to min(primary).

maximum

an optional upper limit for the primary covariate. Defaults to max(primary).

length.out

an optional integer with the number of primary covariate values at which to evaluate the predictions. Defaults to 51.

...

some methods for the generic may require additional arguments.

object

a fitted model object from which predictions can be extracted, using a predict method.

primary

an optional one-sided formula specifying the primary covariate to be used to generate the augmented predictions. By default, if a covariate can be extracted from the data used to generate object (using getCovariate), it will be used as primary.

Value

Stacked data.frame with observations, individual/population predictions.

Details

For a fit with inter-occasion variability, each time takes its subject's estimate for its occasion, carried from the occasion's first record (locf, in the fit's record order where records tie) whatever the covariate interpolation, as the fit steps its occasion.

For a `linCmt()` model with time-varying covariates or occasions, the curves are approximate with rxode2 5.1.8 or earlier: under the default `"locf"` interpolation that rxode2's `linCmt()` took a covariate's value at the end of each interval, as `"nocb"` does, so the times `augPred()` adds moved where a change takes effect. Later rxode2 versions solve such a model as the equivalent ODE model does.

Author

Matthew L. Fidler