Skip to main content
Skip table of contents

computePredictions

Compute predicted observation model values on observation times for each individual in a set of individuals. By default, the predictions are computed for all individuals. If the parameter individualIds is specified, the individualParameters must contain only the parameters for those individuals. That is, the number of rows in individualParameters must be the same as the length of individualIds.

Usage

R
computePredictions(individualParameters, individualIds = NULL)

Arguments

individualParameters

Individual parameter values for each parameter present in the model, either for all individuals or for the set of individuals specified in individualIds". This should be a data.frame with a column for individual id and a column for each parameter.

individualIds

[optional] vector Ids of the individuals for which observation models should be computed. By default, all the individuals are used.

Value

A list of predictions, where each prediction is a vector giving the computed prediction at observation times for each individual

Details

For each prediction, all individual values are returned as a single vector. Thus the number of observations per individual can be used to separate the predictions per individual.

See also

getIndividualParameterModel to get the individual parameter model used for the prediction
getEstimatedIndividualParameters to get individual parameters to use in the prediction

Examples

R
initializeLixoftConnectors("monolix")
project_file <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "theophylline_project.mlxtran")
loadProject(project_file)
runScenario()

ids <- c(1,4)
individualParamsForAllIndiv <- getEstimatedIndividualParameters()$saem

predictions <- computePredictions( individualParameters = individualParamsForAllIndiv[ids,],
                                   individualIds = ids )

obsInfo = getObservationInformation()
allIds = unique(obsInfo$y$id)
obsPred = cbind(obsInfo$y[obsInfo$y$id %in% allIds[ids]], y_pred = predictions$Cc)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.