Exposure-Response Tools for Time-to-Event Models

Provides estimation tools for exposure-response models of time-to-event endpoints based on the 'survival' package: parametric accelerated failure time model fitting and prediction with AIC-based distribution selection, stepwise covariate modelling, and simulation-based visual predictive checks. Tested and supported for the exponential, Weibull, log-normal, and log-logistic distributions. For a model-agnostic mini-language to visualise exposure-response models (including those fitted with 'ertte'), see the companion package 'erplots'.


ertte

R-CMD-check Codecov testcoverage

Provides tools for working with exposure-response models for time-to-event data. It is designed with a similar interface to the erglm and emaxnls packages, and supports the plotting interface supplied by the erplots package. It provides two model-fitting engines, one for parametric AFT regression models and another for semi-parametric Cox proportional-hazards regression, behind a shared, tidy interface for survival-probability prediction, restricted mean survival time, landmark analysis, stepwise covariate modelling, and simulation.

Installation

You can install the development version of ertte from GitHub with:

# install.packages("pak")
pak::pak("djnavarro/ertte")

Example

library(ertte)

mod <- ertte_aft(Surv(time, event) ~ aucss, ertte_data)
mod
#> Call:
#> survival::survreg(formula = formula, data = data, dist = dist)
#> 
#> Coefficients:
#>   (Intercept)         aucss 
#>  4.8563375087 -0.0006407913 
#> 
#> Scale= 0.7164032 
#> 
#> Loglik(model)= -1207.3   Loglik(intercept only)= -1263.9
#>  Chisq= 113.25 on 1 degrees of freedom, p= <2e-16 
#> n= 300

ertte_predict(mod, ertte_data[1:5, ], time = c(30, 60, 90))
#> # A tibble: 15 × 14
#>       id sex      age weight  dose treatment aucss cmaxss  time event admin_censor fit_survival ci_lower ci_upper
#>    <int> <fct>  <int>  <dbl> <dbl> <fct>     <dbl>  <dbl> <dbl> <dbl>        <dbl>        <dbl>    <dbl>    <dbl>
#>  1     1 Female    27     70   200 Drug      1114.  187.     30     1          180        0.701   0.666     0.733
#>  2     1 Female    27     70   200 Drug      1114.  187.     60     1          180        0.393   0.344     0.441
#>  3     1 Female    27     70   200 Drug      1114.  187.     90     1          180        0.193   0.152     0.237
#>  4     2 Female    27     59   100 Drug       561.   49.1    30     0          180        0.805   0.780     0.827
#>  5     2 Female    27     59   100 Drug       561.   49.1    60     0          180        0.565   0.521     0.607
#>  6     2 Female    27     59   100 Drug       561.   49.1    90     0          180        0.366   0.317     0.416
#>  7     3 Female    24     65     0 Placebo      0     0      30     0          180        0.877   0.856     0.895
#>  8     3 Female    24     65     0 Placebo      0     0      60     0          180        0.708   0.665     0.747
#>  9     3 Female    24     65     0 Placebo      0     0      90     0          180        0.544   0.487     0.598
#> 10     4 Female    29     63     0 Placebo      0     0      30     0          180        0.877   0.856     0.895
#> 11     4 Female    29     63     0 Placebo      0     0      60     0          180        0.708   0.665     0.747
#> 12     4 Female    29     63     0 Placebo      0     0      90     0          180        0.544   0.487     0.598
#> 13     5 Male      27     91   200 Drug      1416.  143.     30     1          180        0.628   0.584     0.669
#> 14     5 Male      27     91   200 Drug      1416.  143.     60     1          180        0.294   0.242     0.347
#> 15     5 Male      27     91   200 Drug      1416.  143.     90     1          180        0.116   0.0824    0.155

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("ertte")

0.1.1 by Danielle Navarro, 9 hours ago


https://github.com/djnavarro/ertte, https://ertte.djnavarro.net/


Report a bug at https://github.com/djnavarro/ertte/issues


Browse source code at https://github.com/cran/ertte


Authors: Danielle Navarro [aut, cre] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports dplyr, mvtnorm, rlang, stats, survival, tibble, withr

Suggests erplots, knitr, rmarkdown, testthat


See at CRAN