Learn R Programming

xpose.xtras

Introduction

This package adds some extra functionality and plots to the xpose framework. This includes some plots that have been missing in translation from xpose4, but also some useful features that truly extend the capabilities of what can be done with xpose.

There are a few bugfixes here and functionality which could easily be suggested as pull requests to the parent package. Given the size and broad use of xpose, it appears even minor pull requests take some time to implement. As such, this package implements those features directly and if at any point in the future these are added (perhaps in a better state) to the parent package, they will be deprecated if this package is in active use.

For those wondering, conflicted is used to manage bugfix conflicts, so users should be comfortable loading packages in any order.

Installation

This package is currently only available here, but submission to CRAN is planned soon.

The typical github installation will work.

devtools::install_github("jprybylski/xpose.xtras")

Preview

The grandparent package, xpose4, has a nice collection of figures and documentation that is referred to as a ā€œbestiaryā€. The documentation site for this package serves as a complete bestiary, but see the uncommented examples below as a sort of menagerie. There is no assumption that these examples are self-explanatory, but hopefully users familiar with xpose will recognize the new (and renewed) tools made available by this package.

EBEs versus covariates

described <- xpdb_x %>%
  set_var_labels(AGE="Age", MED1 = "Digoxin", .problem = 1) %>%
  set_var_units(AGE="yrs")  %>%
  set_var_levels(SEX=lvl_sex(), MED1 = lvl_bin())
eta_vs_contcov(described,etavar=ETA1, quiet=TRUE)
#> `geom_smooth()` using formula = 'y ~ x'
#> `geom_smooth()` using formula = 'y ~ x'
eta_vs_catcov(described,etavar=ETA1, quiet=TRUE)

Shark plots

pheno_set %>%
  focus_qapply(backfill_iofv) %>%
  dofv_vs_id(run6, run9, quiet = TRUE)

Categorical DVs

pkpd_m3 %>%
  set_var_types(catdv=BLQ,dvprobs=LIKE) %>%
  set_dv_probs(1, 1~LIKE, .dv_var = BLQ) %>%
  set_var_levels(1, BLQ = lvl_bin()) %>%
  catdv_vs_dvprobs(quiet=TRUE)
#> `geom_smooth()` using method = 'gam' and formula = 'y ~ s(x, bs = "cs")'
#> `geom_smooth()` using method = 'gam' and formula = 'y ~ s(x, bs = "cs")'

Copy Link

Version

Install

install.packages('xpose.xtras')

Monthly Downloads

174

Version

0.0.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

John Prybylski

Last Published

November 21st, 2024

Functions in xpose.xtras (0.0.2)

franken_prop

Combine a property from all components of a franken_xpdb
mutate.xpose_set

Mutation method for xpose_set
get_prop

Generic function to extract a property from a model summary
modify_xpdb

Add, remove or rename variables in an xpdb
pkpd_m3_df

An xp_xtras example of an M3 model (dataset)
get_prm

Access model parameters
modavg_xpdb

Create a model-averaged xpose data object
reshape_set

Convert xpose_set to a nested list.
expose_property

Expose a property of xpdb objects in an xpose_set
mutate_prm

Transform parameter values in place
set_dv_probs

Set probability columns for categorical endpoints
pheno_base

An xp_xtras example of a base model
set_option

Set an xpose option
param_selector

Select parameter row number
pkpd_m3

An xp_xtras example of an M3 model
fill_prob_subprob_method

Place .problem, .subprob and .method into environment consistently
as_leveler

Level-defining helper functions
get_index

Get full index for xpose_data data
set_var_types

Set variable types
get_shk

Get shrinkage estimates from model summary
list_dv_probs

For a categorical DV variable, show associated probabilities
iofv_vs_mod

Objective function changes across models
is_xp_xtras

Basic class checker for xp_xtras
pheno_saem

An xp_xtras example of a final model
pheno_final

An xp_xtras example of a final model
eta_vs_contcov

Eta continuous covariate plots (typical)
irep

Add simulation counter
pull.xpose_set

Pulling method for xpose_set
select.xpose_set

Selection method for xpose_set
select_subset

Convenience wrapper for tidyselect
set_var_types_x

Set variable types
reexports

Objects exported from other packages
prm_waterfall

Specific waterfall plots
set_var_types.xp_xtras

Set variable types
set_var_types.default

Set variable types
franken_xpdb

Combine several xpose_data objects into one
shark_colors

Change colors of shark plots
xp4_xtra_theme

Updated version of the xpose4 theme
xplot_boxplot

Default xpose boxplot function
pheno_set

A more complex example of xpose_set object
shark_plot

Individual contributions to dOFV
set_prop

Set a summary property
set_base_model

Base model for xpose_set
%>%

Pipe operator
xp_var

xp_var Method
xplot_pairs

Wrapper around ggpairs
set_var_levels

Set variable levels
vismo_pomod

An xp_xtras example of the proportional odds categorical vismodegib model
expose_param

Expose a model parameter of xpdb objects in an xpose_set
dv_vs_ipred_modavg

Model average plots
list_vars

Updates to list_vars
two_set_dots

Typical processing for plots of 2 sets
vismodegib

A tibble of mock data used for fitting vismodegib models
val2lvl

Translate values to levels
summarise_xpdb

Group/ungroup and summarize variables in an xpdb
wrap_xp_ggally

Ensure consistent style with GGally functions
xpdb_set

An example xpose_set object
xpose_set

Generate a set of xpdb objects
ipred_vs_ipred

Compare model predictions
vismo_dtmm

An xp_xtras example of the discrete-time Markov model of categorical vismodegib data
xpose.xtras-package

xpose.xtras: Extra Functionality for the 'xpose' Package
proc_levels

Convert levels list into tibble
xp_xtra_theme

Extra theme defaults
reportable_digits

Reportable digits for model fit
rename.xpose_set

Renaming method for xpose_set
as_xpdb_x

Convert an object to an xpose_data and xp_xtras object
xpdb_x

An example xp_xtras object
xset_lineage

Determine lineage within a set
xset_waterfall

Waterfall plot
check_xpose_set

Check an xpose_set object
add_prm_association

Describe parameter associations
desc_from_comments

Backfill utility for descriptions
diagram_lineage

Visualize xpose_set
catdv_vs_dvprobs

Non-simulation based likelihood model diagnostic
add_xpdb

Add one or more xpdb objects to an xpose_set
is_formula_list

Convenience functions used in package
check_levels

Verify validity of level list
grab_xpose_plot

Grab processed xpose_plot
backfill_iofv

Add individual objective function to data
edit_xpose_data

Master xpdb editing function
add_relationship

Add relationship(s) to an xpose_set
diff.xpose_set

Display deltaOFV values across xpose_set
eta_vs_catcov

Eta categorical covariate plots (typical)
filter.xpose_set

Filtration method for xpose_set
%p%

Binary check if LHS is parent of LHS
duplicated.xpose_set

Check if any xpose_data objects are repeated in xpose_set
focus_xpdb

Focus on an xpdb object in an xpose_set
eta_grid

Grid plots