Sample NLME random effects given population parameter values describing the inter-individual variability distribution

Sample NLME random effects given population parameter values describing the inter-individual variability distribution

sampleRandomEffects(
  spec,
  iivPopParamValues,
  Nsamples = if (is_IQRnlmeParamSpec(spec)) spec$Nsamples else 1
)

Arguments

spec

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

iivPopParamValues

a data.frame with population parameter values describing the IIV distribution. The number of rows in this data.frame defines the number of populations for which random effects are to be sampled.

Nsamples

integer denoting the number of individuals in a population. Note: in the case of FLAG_SAMPLE=2, this value is used to specify the number of populations (see Npop). Default: if(is_IQRnlmeParamSpec(obj)) obj$Nsamples else 1L.

Value

a data.frame of Nsamples*nrow(iivPopParamValues) rows and columns ID.POP, ID and a column for each model parameter defined in spec.

Author

Venelin Mitov (IntiQuan)

Examples

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