Learn R Programming

saemix (version 2.4)

saemixpredict.newdata: Predictions for a new dataset

Description

Predictions for a new dataset

Usage

saemixpredict.newdata(
  saemixObject,
  saemix.newdata,
  type = c("ipred", "ypred", "ppred", "icpred"),
  nsamp = 1
)

Arguments

saemixObject

an SaemixObject from a fitted run

saemix.newdata

a dataframe containing the new data. The dataframe must contain the same information as the original dataset (colunm names, etc...)

type

one or several of "ipred" (individual predictions using the MAP estimates), "ypred" (population predictions obtained using the population parameters f(E(theta))), "ppred" (mean of the population predictions (E(f(theta)))), "icpred" (individual predictions using the conditional mean estimates)

nsamp

an integer, ignored for other types than icpred; if icpred, returns both the mean of the conditional distribution and nsamp samples, with the corresponding predictions. Defaults to 1.

Value

a list with two components

Details

The function uses estimateMeanParameters.newdata() to set the population estimates for the individual parameters taking into account the individual covariates and doses, and estimateIndividualParameters.newdata() to derive individual estimates by computing the mean of the conditional distributions (type="icpred") or the MAP estimate (type="ipred")

Warning: this function is currently under development and the output may change in future versions of the package to conform to the usual predict functions.

Examples

Run this code
# NOT RUN {
# TODO
# }

Run the code above in your browser using DataLab