Calculate typical individual parameter values by applying covariate formulae to reference population parameter values

Calculate typical individual parameter values by applying covariate formulae to reference population parameter values

calcTypicalIndParamValues(
  spec,
  referencePopParamValues,
  data,
  doCartesian = TRUE
)

Arguments

spec

a filename (character string) denoting the path to a GPF excel file, or a GPF object, or an IQRnlmeParamSpec object.

referencePopParamValues

a data.frame with a column ID.POP and columns including at least the model parameters and the betas.

data

a data.frame describing patient or other subject covariate and regressor data. If nrow(data) == nrow(referencePopParamValues), then the function supports two possible treatments depending on doCartesian (see description for doCartesian argument below).

doCartesian

a logical. When TRUE (the DEFAULT), each row in referencePopParamValues is bound to data, so that the returned data.frame contains nrow(referencePopParamValues)*nrow(data) rows. If FALSE (only allowed when nrow(referencePopParamValues) == nrow(data)), then the two tables are joined using cbind.

Value

a data.frame with number of rows equal either to nrow(referencePopParamValues)*nrow(data) (when doCartesian == TRUE) (default)), or nrow(referencePopParamValues) (when doCartesian == FALSE && nrow(referencePopParamValues) == nrow(data)). The columns in this data.frame are ID.POP, ID and other columns matching the model parameters according to spec.

Author

Venelin Mitov (IntiQuan)

Examples

if (FALSE) { # \dontrun{
#See the examples for sampleIndParamValues:
?sampleIndParamValues
} # }