Skip to contents

xp_xtras objects

Functions for creating, checking and manipulating xp_xtras objects.

as_xpdb_x() as_xp_xtras() check_xpdb_x() check_xp_xtras()
Convert an object to an xpose_data and xp_xtras object
check_xpose_set() check_xpose_set_item()
Check an xpose_set object
is_xp_xtras()
Basic class checker for xp_xtras
set_var_levels()
Set variable levels
set_var_types() experimental
Set variable types
set_var_types(<default>) experimental
Set variable types
set_var_types(<xp_xtras>) experimental
Set variable types
set_var_types_x() experimental
Set variable types
as_leveler() is_leveler() lvl_bin() lvl_sex() lvl_inord()
Level-defining helper functions
val2lvl()
Translate values to levels
backfill_iofv()
Add individual objective function to data
attach_nlmixr2()
Attach nlmixr2 fit object to xpose data object
backfill_nlmixr2_props()
Populate some properties from nlmixr2 fit
get_prm_nlmixr2()
get_prm equivalent for nlmixr2 fits
nlmixr2_as_xtra()
Convenience function for ingesting an nlmixr2 model to xpose and xpose.xtras
nlmixr2_m3
An xp_xtra example based on a nlmixr2 fit with M3 censoring
nlmixr2_prm_associations()
Based on associations baked into nlmixr2, automatically add to xpose data
nlmixr2_warfarin
An xp_xtra example based on a complex nlmixr2 fit
xpdb_nlmixr2 xpdb_nlmixr2_saem
An xp_xtra example based on an nlmixr2 fit
xp_var()
xp_var Method
check_levels()
Verify validity of level list

xpose sets

Work with collections of models using xpose_set.

xpose_set()
Generate a set of xpdb objects
xset_lineage()
Determine lineage within a set
xset_waterfall()
Waterfall plot
add_xpdb()
Add one or more xpdb objects to an xpose_set
focus_xpdb() unfocus_xpdb() focused_xpdbs() focus_function() focus_qapply()
Focus on an xpdb object in an xpose_set
reshape_set() unreshape_set()
Convert xpose_set to a nested list.
diagram_lineage() experimental
Visualize xpose_set
add_prm_association() drop_prm_association()
Describe parameter associations
mutate_prm()
Transform parameter values in place
add_relationship() remove_relationship()
Add relationship(s) to an xpose_set
`%p%`
Binary check if LHS is parent of LHS

Plotting helpers

Additional plotting functions and themes extending xpose.

xplot_boxplot()
Default xpose boxplot function
xplot_pairs()
Wrapper around ggpairs
xplot_rocplot()
Default xpose ROC plot function
iofv_vs_mod()
Objective function changes across models
prm_waterfall() eta_waterfall() iofv_waterfall()
Specific waterfall plots
shark_plot() dofv_vs_id()
Individual contributions to dOFV
eta_vs_catcov()
Eta categorical covariate plots (typical)
eta_vs_contcov()
Eta continuous covariate plots (typical)
eta_grid() cov_grid() eta_vs_cov_grid()
Grid plots
dv_vs_ipred_modavg() dv_vs_pred_modavg() ipred_vs_idv_modavg() pred_vs_idv_modavg() plotfun_modavg() experimental
Model average plots
ipred_vs_ipred() pred_vs_pred()
Compare model predictions
catdv_vs_dvprobs()
Non-simulation based likelihood model diagnostic
roc_by_mod()
ROC curve across models
roc_plot()
ROC Plot for categorical DVs
shark_colors()
Change colors of shark plots
ind_roc()
Individual ROC plots
xset_waterfall()
Waterfall plot
xp_xtra_theme()
Extra theme defaults
xp4_xtra_theme()
Updated version of the xpose4 theme
grab_xpose_plot()
Grab processed xpose_plot
wrap_xp_ggally()
Ensure consistent style with GGally functions

Utilities

Miscellaneous helpers and integrations.

modavg_xpdb() experimental
Create a model-averaged xpose data object
eta_grid() cov_grid() eta_vs_cov_grid()
Grid plots
nlmixr2_as_xtra()
Convenience function for ingesting an nlmixr2 model to xpose and xpose.xtras
nlmixr2_m3
An xp_xtra example based on a nlmixr2 fit with M3 censoring
nlmixr2_prm_associations()
Based on associations baked into nlmixr2, automatically add to xpose data
nlmixr2_warfarin
An xp_xtra example based on a complex nlmixr2 fit
desc_from_comments()
Backfill utility for descriptions
edit_xpose_data()
Master xpdb editing function
expose_param()
Expose a model parameter of xpdb objects in an xpose_set
expose_property()
Expose a property of xpdb objects in an xpose_set
get_prop()
Generic function to extract a property from a model summary
set_prop()
Set a summary property
get_index() set_index()
Get full index for xpose_data data
set_base_model() get_base_model() unset_base_model()
Base model for xpose_set
set_dv_probs()
Set probability columns for categorical endpoints
list_dv_probs()
For a categorical DV variable, show associated probabilities
group_by_x() ungroup_x()
Group/ungroup and summarize variables in an xpdb
mutate_x() rename_x()
Add, remove or rename variables in an xpdb
select_subset()
Convenience wrapper for tidyselect
set_option()
Set an xpose option
reportable_digits()
Reportable digits for model fit
test_xpdb()
Logical instead of exception for xpose data check
irep() deprecated
Add simulation counter
derive_prm() backfill_derived()
Derive full parameter set for mammillary PK model
diagnose_constants()
Check for potential parameterization issues
get_prm()
Access model parameters
get_shk()
Get shrinkage estimates from model summary
list_vars()
Updates to list_vars

Data

Example objects for documentation.

nlmixr2_m3
An xp_xtra example based on a nlmixr2 fit with M3 censoring
nlmixr2_warfarin
An xp_xtra example based on a complex nlmixr2 fit
pheno_base
An xp_xtras example of a base model
pheno_final
An xp_xtras example of a final model
pheno_saem
An xp_xtras example of a final model
pheno_set
A more complex example of xpose_set object
pkpd_m3
An xp_xtras example of an M3 model
pkpd_m3_df
An xp_xtras example of an M3 model (dataset)
vismo_dtmm
An xp_xtras example of the discrete-time Markov model of categorical vismodegib data
vismo_pomod
An xp_xtras example of the proportional odds categorical vismodegib model
vismodegib
A tibble of mock data used for fitting vismodegib models
xpdb_nlmixr2 xpdb_nlmixr2_saem
An xp_xtra example based on an nlmixr2 fit
xpdb_set
An example xpose_set object
xpdb_x
An example xp_xtras object