MonolixSuite in R
Auto Light Dark
Auto Light Dark

listingDosingRegimen()

This function generates a dosing regimen listing from a PKanalix or Monolix project, with one row per administration record in the dataset. For each dose record the administered amount and administration time are listed, together with any regimen describing columns that are present in the dataset (occasions, administration id, steady state flag, interdose interval, number of additional doses, infusion rate and infusion duration). The function supports stratification columns and row filtering by covariates or subject ids.

Usage

R
listingDosingRegimen(projectFile          = NULL,
                     splitCovariates      = NULL,
                     splitCovariateLabels = NULL,
                     filterCovariates     = NULL,
                     filterIds            = NULL,
                     mock                 = FALSE)

Arguments

  • projectFile (character): Path to a PKanalix (.pkx) or Monolix (.mlxtran) project file, or NULL to use the currently loaded project.

  • splitCovariates (character vector): Categorical covariate or occasion name(s) to include as columns and sort by; validated against the project. NULL yields a plain listing with no stratification columns.

  • splitCovariateLabels (character vector): Custom labels for splitCovariates, of the same length as splitCovariates; if NULL, the original covariate names are used. When splitCovariates is set, these labels rename the corresponding covariate columns in the listing.

  • filterCovariates (list): Named list of categorical covariate filters, e.g. list(SEX = "M", DOSE = c("100", "200")); rows not matching the allowed values are dropped. NULL applies no filtering.

  • filterIds (character/numeric vector): Subject ids to keep; NULL applies no id filtering.

  • mock (logical): If TRUE, masks values for documentation/examples (administration id becomes "adm1", occasions become "occ1", categorical and stratification covariates become "Category 1", and all numeric columns (time, amount, ss, ii, addl, rate, tinf) become "xx.xx"). Default FALSE.

Returns a data frame with one row per administration record, containing: subject id, split covariates and occasion(s), administration id (if present), administration time, administered amount, and any present regimen descriptors (steady state flag, interdose interval, number of additional doses, infusion rate and infusion duration), plus merged stratification categorical covariates (if any).

Examples

Dosing regimen listing of a steady state multiple dose regimen by period

R
initializeLixoftConnectors(path.software, software = "pkanalix")
loadProject(paste0(getDemoPath(),"/2.case_studies/project_Theo_extravasc_SS.pkx"))
  
head(listingDosingRegimen(), n=12)

#> id PERIOD Time Amount SS II
#>  1      1   24    800      
#>  1      1   48    800      
#>  1      1   72    800      
#>  1      1   96    800      
#>  1      1  120    800      
#>  1      1  144    800  1 24
#>  1      2   24    800      
#>  1      2   48    800      
#>  1      2   72    800      
#>  1      2   96    800      
#>  1      2  120    800      
#>  1      2  144    800  1 24

Dosing regimen listing filtered and split by covariates for selected ids

R
initializeLixoftConnectors(path.software, software = "pkanalix")
loadProject(paste0(getDemoPath(),"/2.case_studies/project_Theo_extravasc_SS.pkx"))

listingDosingRegimen(
  splitCovariates      = c("SEQ", "FORM"),
  splitCovariateLabels = c("Sequence", "Formulation"),
  filterCovariates     = list(SEQ = "TR"),
  filterIds            = c(1, 2)
)
#> Sequence Formulation id PERIOD Time Amount SS II
#>       TR         ref  1      2   24    800      
#>       TR         ref  1      2   48    800      
#>       TR         ref  1      2   72    800      
#>       TR         ref  1      2   96    800      
#>       TR         ref  1      2  120    800      
#>       TR         ref  1      2  144    800  1 24
#>       TR        test  1      1   24    800      
#>       TR        test  1      1   48    800      
#>       TR        test  1      1   72    800      
#>       TR        test  1      1   96    800      
#>       TR        test  1      1  120    800      
#>       TR        test  1      1  144    800  1 24

Last updated: