Learn R Programming

⚠️There's a newer version (1.1.0) of this package.Take me there.

precmed

Precision Medicine - Comprehensive R package

A doubly robust precision medicine approach to estimate and validate conditional average treatment effects

Installation

The precmed package can be installed from CRAN as follows:

install.packages("precmed")

The latest version can be installed from GitHub as follows:

install.packages("devtools")
devtools::install_github(repo = "smartdata-analysis-and-statistics/precmed")

Copy Link

Version

Install

install.packages('precmed')

Monthly Downloads

179

Version

1.0.0

License

Apache License (== 2.0)

Maintainer

Thomas Debray

Last Published

October 12th, 2022

Functions in precmed (1.0.0)

atefitmean

Doubly robust estimator of and inference for the average treatment effect for continuous data
atefitsurv

Doubly robust estimator of and inference for the average treatment effect for survival data
arg.checks.common

Check arguments that are common to all types of outcome USed inside arg.checks()
abc

Compute the area between curves from the "precmed" object
abc.precmed

Compute the area between curves from the "precmed" object
balance.split

Split the given dataset into balanced training and validation sets (within a pre-specified tolerance) Balanced means 1) The ratio of treated and controls is maintained in the training and validation sets 2) The covariate distributions are balanced between the training and validation sets
catefitcount

Estimation of the conditional average treatment effect (CATE) score for count data
catecv

Cross-validation of the conditional average treatment effect (CATE) score for count, survival or continuous outcomes
catecvmean

Cross-validation of the conditional average treatment effect (CATE) score for continuous outcomes
boxplot.precmed

A set of box plots of estimated ATEs from the "precmed" object
catefitsurv

Estimation of the conditional average treatment effect (CATE) score for survival data
catecvcount

Cross-validation of the conditional average treatment effect (CATE) score for count outcomes
balancesurv.split

Split the given time-to-event dataset into balanced training and validation sets (within a pre-specified tolerance) Balanced means 1) The ratio of treated and controls is maintained in the training and validation sets 2) The covariate distributions are balanced between the training and validation sets
catecvsurv

Cross-validation of the conditional average treatment effect (CATE) score for survival outcomes
catefitmean

Estimation of the conditional average treatment effect (CATE) score for continuous data
catefit

Estimation of the conditional average treatment effect (CATE) score for count, survival and continuous data
data.preproc.surv

Data preprocessing Apply at the beginning of catefitcount(), catecvcount(), catefitsurv(), and catecvsurv(), after arg.checks()
countExample

Simulated data with count outcome
drcount

Doubly robust estimator of the average treatment effect for count data
drmean

Doubly robust estimator of the average treatment effect for continuous data
estcount.multilevel.subgroup

Estimate the ATE of the log RR ratio in one multilevel subgroup defined by the proportions
drsurv

Doubly robust estimator of the average treatment effect with Cox model for survival data
estcount.bilevel.subgroups

Estimate the Average Treatment Effect of the log risk ratio in multiple bi-level subgroups defined by the proportions
data.preproc.mean

Data preprocessing Apply at the beginning of catefitmean() and catecvmean(), after arg.checks()
cox.rmst

Estimate restricted mean survival time (RMST) based on Cox regression model
data.preproc

Data preprocessing Apply at the beginning of pmcount() and cvcount(), after arg.checks()
intxsurv

Estimate the CATE model using specified scoring methods for survival outcomes
estmean.bilevel.subgroups

Estimate the ATE of the mean difference in multiple bi-level subgroups defined by the proportions
glm.ps

Propensity score estimation with LASSO
intxcount

Estimate the CATE model using specified scoring methods
glm.simplereg.ps

Propensity score estimation with a linear model
estmean.multilevel.subgroup

Estimate the ATE of the mean difference in one multilevel subgroup defined by the proportions
estsurv.multilevel.subgroups

Estimate the ATE of the RMTL ratio and unadjusted hazard ratio in one multilevel subgroup defined by the proportions
estsurv.bilevel.subgroups

Estimate the ATE of the RMTL ratio and unadjusted hazard ratio in multiple bi-level subgroups defined by the proportions
intxmean

Estimate the CATE model using specified scoring methods
scorecount

Calculate the log CATE score given the baseline covariates and follow-up time for specified scoring method methods
print.catefit

Print function for atefit
onearmglmcount.dr

Doubly robust estimators of the coefficients in the two regression
onearmglmmean.dr

Doubly robust estimators of the coefficients in the two regression
twoarmsurv.dr

Doubly robust estimators of the coefficients in the contrast regression as well as their covariance matrix and convergence information
survivalExample

Simulated data with survival outcome
onearmsurv.dr

Doubly robust estimators of the coefficients in the two regression
plot.atefit

Histogram of bootstrap estimates
survCatch

Catch errors and warnings when estimating the ATEs in the nested subgroup
plot.precmed

Two side-by-side line plots of validation curves from the "precmed" object
print.atefit

Print function for atefit
twoarmglmmean.dr

Doubly robust estimators of the coefficients in the contrast regression as well as their covariance matrix
ipcw.surv

Probability of being censored
twoarmglmcount.dr

Doubly robust estimators of the coefficients in the contrast regression as well as their covariance matrix and convergence information
meanCatch

Catch errors and warnings when estimating the ATEs in the nested subgroup for continuous data
meanExample

Simulated data with a continuous outcome
scoremean

Calculate the CATE score given the baseline covariates for specified scoring method methods
scoresurv

Calculate the log CATE score given the baseline covariates and follow-up time for specified scoring method methods for survival outcomes
atefit

Doubly robust estimator of and inference for the average treatment effect for count, survival and continuous data
arg.checks

Check arguments Catered to all types of outcome Apply at the beginning of pmcount(), cvcount(), drcount.inference(), catefitsurv(), catecvsurv(), and drsurv.inference()
balancemean.split

Split the given dataset into balanced training and validation sets (within a pre-specified tolerance) Balanced means 1) The ratio of treated and controls is maintained in the training and validation sets 2) The covariate distributions are balanced between the training and validation sets
atefitcount

Doubly robust estimator of and inference for the average treatment effect for count data