Skip to contents

Generalized simulations output (GSO) is the long-format data frame returned by sg_sim() and related simulation helpers. Run the bundled gsi_pk1c scenario with gmo_pk1c to reproduce the standard example output.

Format

GSO

A data frame in long format with one row per ID, replicate, time point, and output variable. With population uncertainty (thetamat, npop > 1) typical columns are:

ID

Dosing scenario identifier from the event table.

POPN

Population replicate index (present when thetamat is used).

sim.id

Subject replicate index (present when omega is used).

TIME

Simulation time (h).

VAR

Output variable name (e.g. "Cc").

VALUE

Simulated value.

When aggr is set, aggregation statistic columns (mean, median, P05, …) replace or supplement VALUE; see the Details section of sg_sim().

Examples

# \donttest{
gso <- do.call(sg_sim, c(list(model = gmo_pk1c), gsi_pk1c))
#> Warning: multi-subject simulation without without 'omega'
names(gso)
#> [1] "POPN"  "ID"    "TIME"  "VAR"   "VALUE"
head(gso)
#> # A tibble: 6 × 5
#>    POPN    ID  TIME VAR   VALUE
#>   <dbl> <int> <dbl> <chr> <dbl>
#> 1     1     1 0     Cc    0    
#> 2     1     1 0.603 Cc    0.616
#> 3     1     1 1.21  Cc    0.840
#> 4     1     1 1.81  Cc    0.877
#> 5     1     1 2.41  Cc    0.832
#> 6     1     1 3.02  Cc    0.754
subset(gso, VAR == "Cc" & ID == 1 & POPN == 1)
#> # A tibble: 200 × 5
#>     POPN    ID  TIME VAR   VALUE
#>    <dbl> <int> <dbl> <chr> <dbl>
#>  1     1     1 0     Cc    0    
#>  2     1     1 0.603 Cc    0.616
#>  3     1     1 1.21  Cc    0.840
#>  4     1     1 1.81  Cc    0.877
#>  5     1     1 2.41  Cc    0.832
#>  6     1     1 3.02  Cc    0.754
#>  7     1     1 3.62  Cc    0.667
#>  8     1     1 4.22  Cc    0.582
#>  9     1     1 4.82  Cc    0.505
#> 10     1     1 5.43  Cc    0.436
#> # ℹ 190 more rows
# }