Samples parameters from an IQRnlmeProject

Samples sets of population and / or individual parameters from an IQRnlmeProject. Different sampling types can be specified (see below).

sample_IQRnlmeProject(
  projectPath,
  Nsamples = NULL,
  FLAG_SAMPLE = 0,
  covariates = NULL,
  FLAGid = FALSE,
  verbose = TRUE
)

Arguments

projectPath

An IQRnlmeProject or a character string with the path to an IQRnlmeProject folder.

Nsamples

Number of samples to generate. If NULL number of samples is set equal set to number of rows of covariates.

FLAG_SAMPLE

Flag indicating the type of sampling:

FLAG_SAMPLE Meaning
=========== ===================================================
0 Use point estimates of population parameters (do not consider uncertainty) and sample Nsample individual patients based on these. Covariates considered if defined by user and used in model. Please note: population parameters do not take covariates into account!
1 Sample single set of population parameters from uncertainty distribution and sample Nsample individual patient parameters based on these. Covariates considered if defined by user and used in model. Please note: population parameters do not take covariates into account!
2 Sample Nsample sets of population parameters from uncertainty distribution. Do not sample from variability distribution and do not take into account covariates (even if user specified).
3 Use point estimates of population parameters (do not consider uncertainty) Return Nsamples sets of population parameters with covariates taken into account.
4 Sample single set of population parameters from uncertainty distribution Return Nsamples sets of population parameters with covariates taken into account.
5 Use point estimates of population parameters (do not consider uncertainty) and sample Nsample individual patients based on these. Covariates considered if defined by user and used in model. Population parameters, typical individual parameters (no IIV, but considering covariates), and individual parameters are returned.
6 Sample single set of population parameters from uncertainty distribution and sample Nsample individual patient parameters based on these. Covariates considered if defined by user and used in model. Sampled population parameters, typical individual parameters (no IIV, but considering covariates), and individual parameters are returned.
7 Same as FLAG_SAMPLE=0 but obtaining the empirical random effect covariance matrix from the post-hoc ETAs. Only used for IQRsysProject. If IQRnlmeProject then fallback to flag 0.
8 Same as FLAG_SAMPLE=1 but obtaining the empirical random effect covariance matrix from the post-hoc ETAs.
Only used for IQRsysProject. If IQRnlmeProject then fallback to flag 1.
covariates

Data frame or matrix. Column names need to contain names of the covariates. If Nsamples is set (not NULL) then there are 3 cases: if covariates is a data.frame wirh nrows as Nsamples then this is used as is. If nrows>Nsamples, sampling without replacement from the covariates is done and if nrows<Nsamples then sampling from covariates with replacement is done. Not all covariates that are used in the model need to be present.

FLAGid

If TRUE ID column is added to individual parameters (SAMPLE_FLAG = 0, 1, 5, or 6) or population parameters (SAMPLE_FLAG = 2, 3, 4, 5, or 6). Otherwise only data frames with parameters only are returned (default).

verbose

If TRUE then warnings are shown. If FALSE no warnings are shown but only errors.

Value

A list with sampling results

See also

Other IQRnlmeProject: IQRnlmeEst(), IQRnlmeProject(), addCovariateToModelSpec_IQRest(), addPar_modelSpec(), as_IQRnlmeProjectMulti(), as_IQRnlmeProject(), bootstrap_IQRnlmeProject(), compareModels_IQRnlmeProjectMulti(), convertETAINDIVPRED_IQRnlmeProject(), covariateEffect_IQRnlmeProject(), createDataVPC_IQRnlmeProject(), data_IQRest(), dosing_IQRest(), duplicate_IQRnlmeProject(), eigenvalues_IQRnlmeProject(), exportVirtualSubjects_IQRnlmeProject(), getData_IQRnlmeProject(), getETAs_IQRnlmeProject(), getEst_IQRnlmeProject(), getHeader_IQRnlmeProject(), getIndivParameters_IQRnlmeProject(), getIndivPredictions_IQRnlmeProject(), getModel_IQRnlmeProject(), getObsPred_IQRnlmeProject(), getPopParameters_IQRnlmeProject(), getResults_IQRnlmeProjectMulti(), getResults_IQRnlmeProject(), hasrun_IQRnlmeProjectMulti(), hasrun_IQRnlmeProject(), informationContent_IQRnlmeProject(), is_IQRnlmeEst(), is_IQRnlmeProjectMulti(), is_IQRnlmeProject(), is_MONOLIX_IQRnlmeProject(), is_NLMIXR_IQRnlmeProject(), is_NONMEM_IQRnlmeProject(), modelSpec_IQRest(), outlier_IQRnlmeProject(), plot.IQRnlmeProjectMulti(), plot.IQRnlmeProject(), plotConvergence_IQRnlmeProject(), plotETACOV_IQRnlmeProject(), plotETA_IQRnlmeProject(), plotGOF_IQRnlmeProject(), plotINDIVSIM_IQRnlmeProject(), plotINDIV_IQRnlmeProject(), plotVPC_IQRdataVPC(), pred_IQRnlmeProject(), print.IQRnlmeEst(), print.IQRnlmeProjectMulti(), print.IQRnlmeProject(), print_modelSpec(), run_IQRnlmeProjectMulti(), run_IQRnlmeProject(), summary.IQRnlmeProjectMulti(), summary.IQRnlmeProject(), summaryComments_IQRnlmeProjectMulti(), summaryCorrelations_IQRnlmeProjectMulti(), summaryCovariates_IQRnlmeProjectMulti(), summaryParameters_IQRnlmeProjectMulti(), vpc_IQRnlmeProject()