Perform simulations for prediction distribution plots
Usage
sg_predist_sim(
fpath_i,
gco = NULL,
model = NULL,
time_col = "TIME",
outputs = NULL,
npop = 500
)Arguments
- fpath_i
String, GFO, or a named list with a
GFOcomponent (and optionallyGCO). If a string is given, the path to a.RDataor.jsonfile with a fit object is expected.- gco
Generalized control object (see GMO). Either an R list or path to Rdata/json file. Either
gcoormodelshould be specified for the simulation model specification. Default isNULL- model
GMO. RxODE2 model to simulate from.
- time_col
String. The column to use as a time column. Currently, can be only
TIME. Default isTIME.- outputs
Vector of strings. Names of the model variables to output. If
NULL, all variables returned. Default isNULL.- npop
Integer. Number of population replicates. Default is 1.
Value
GSO: a data frame with simulation results.
See also
GFO, GMO, GSO, sg_sim(), sg_vpc_sim()
Examples
# \donttest{
library(rxode2)
fpath_i <- system.file("extdata", "simurg_object", "Warfarin_PK.RData", package = "SimuRg")
#> Warning: cannot open compressed file '/tmp/RtmpLedq7K/temp_libpath8b6abff614d/SimuRg/DESCRIPTION', probable reason 'No such file or directory'
mod_fin <- rxode2({
# Differential equations
ka = ka_pop*exp(omega_ka)
V = V_pop
Cl = Cl_pop*exp(omega_Cl)
d/dt(Ad) = -ka * Ad
d/dt(Ac) = ka * Ad - Cl/V * Ac
# Concentration calculations
Cc = Ac / V
})
#>
#>
predist_sim <- sg_predist_sim(fpath_i, model = mod_fin, outputs = "Cc")
#> Error: cannot open file '/tmp/RtmpLedq7K/temp_libpath8b6abff614d/SimuRg/R/SimuRg.rdb': No such file or directory
predist_sim
#> Error: object 'predist_sim' not found
# }
