# Tools for Performing Pharmacokinetic-Pharmacodynamic Simulations

## Documentation for package ‘PKPDsim’ version 1.4.0

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

add_quotes | Put vector values in quotes
add_ruv | Add residual variability to the dependent variable
add_ruv_to_quantile | Calculate the increase in a specific quantile for a distribution on y when residual variability is added
adherence_binomial | Binomial adherence
adherence_markov | Markov adherence model
advan | ADVAN-style functions to calculate linear PK systems
advan_create_data | Create ADVAN-style dataset
advan_parse_output | Internal function to parse the raw output from ADVAN-style functions
advan_process_infusion_doses | Add column RATEALL to ADVAN-style dataset to handle infusions
apply_duration_scale | Apply infusion duration scale to a regimen
apply_lagtime | Apply lagtime to a regimen
available_default_literature_models | See models from the literature available for installation
calculate_parameters | Calculate model-specific variables using a dummy call to sim_ode()
calc_auc_analytic | Convenience function to calculate the AUC based on PK model parameters at any given moment, for linear iv models.
calc_dydP | Calculate derivative
calc_ss_analytic | Returns the state of a linear PK system at steady state (trough) using analytics equations (so for linear PK systems only).
check_obs_input | Checks obs input for valid combinations of cmt, var, scale
compile_sim_cpp | Compile ODE model to c++ function
covariates_table_to_list | Convert covariate table specified as data.frame
covariate_last_obs_only | Use only last observed covariate values
cv_to_omega | Create lower-diagonal omega matrix from CV for parameter estimates
detect_ode_syntax | Auto-detect the syntax for the ODE code
f_cov | covariate function builder
get_fixed_parameters | Get fixed parameters from model definition.
get_model_auc_compartment | Functions for getting information about a model
get_model_covariates | Functions for getting information about a model
get_model_fixed_parameters | Functions for getting information about a model
get_model_info | Functions for getting information about a model
get_model_iov | Functions for getting information about a model
get_model_linearity | Functions for getting information about a model
get_model_parameters | Functions for getting information about a model
get_model_structure | Functions for getting information about a model
get_ode_model_size | Get the number of states in the ODE from the code code C++ code for model
get_parameters_from_code | Get model parameters from code
get_var_y | Get expected variance/sd/ci of dependent variable based on PKPDsim model, parameters, and regimen
ifelse0 | ifelse function but then based on whether value is NULL or not
install_default_literature_model | Install default literature model
is_positive_definite | Is matrix positive definite
join_cov_and_par | Combines covariates and parameters into a single list, useful for reparametrization of the model.
join_regimen | Join two dosing regimens
lower_triangle_mat_size | Size of the lower triangle of the matrix
merge_regimen | Merge two regimens together.
model_from_api | Load model definition from API, and compile to R library
model_library | Model library
mvrnorm2 | More powerful multivariate normal sampling function
na_locf | Fill in NAs with the previous non-missing value
new_adherence | Probabilistically model adherence
new_covariate | New covariate
new_covariate_model | covariate model function
new_ode_model | Create new ODE model
new_regimen | Dose regimen for sim_ode
nlmixr_parse_parameters | Function to parse parameters for a model into a structure used by nlmixr
nm_to_regimen | Create a regimen from NONMEM data
pkdata | PK dataset
pkpdsim_to_nlmixr | Convert a model generated with PKPDsim to an object for nlmixr
pop_regimen | Remove n doses (from tail) of PKPDsim regimen
print_list | Return a list in R syntax
read_model_json | Read model definition from JSON
regimen_to_nm | Convert PKPDsim regimen to NONMEM table (doses only)
reparametrize | Reparametrize model parameters using a reparametrization defined within the model.
search_replace_in_file | Find string and replace in file
shift_regimen | Remove n doses (from start) of PKPDsim regimen
sim | Simulate ODE or analytical equation
sim_core | Only core function of the simulation function, always just returns observations. Mostly useful for estimations / optimal design. Has no checks (for speed)!
sim_ode | Deprecated function, renamed to 'sim()'
sim_ode_shiny | Simulate ODE and create a Shiny app
table_to_list | Convert a table to a list
test_model | Test a model
test_pointer | Test if model still in memory
translate_ode | Translate a model from/to various PKPD simulators
triangle_to_full | Convert triangle omega matrix to full omega matrix