Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2020;96(4):10.18637/jss.v096.i04.
doi: 10.18637/jss.v096.i04. Epub 2020 Nov 29.

LocalControl: An R Package for Comparative Safety and Effectiveness Research

Affiliations

LocalControl: An R Package for Comparative Safety and Effectiveness Research

Nicolas R Lauve et al. J Stat Softw. 2020.

Abstract

The LocalControl R package implements novel approaches to address biases and confounding when comparing treatments or exposures in observational studies of outcomes. While designed and appropriate for use in comparative safety and effectiveness research involving medicine and the life sciences, the package can be used in other situations involving outcomes with multiple confounders. LocalControl is an open-source tool for researchers whose aim is to generate high quality evidence using observational data. The package implements a family of methods for non-parametric bias correction when comparing treatments in observational studies, including survival analysis settings, where competing risks and/or censoring may be present. The approach extends to bias-corrected personalized predictions of treatment outcome differences, and analysis of heterogeneity of treatment effect-sizes across patient subgroups.

Keywords: Kaplan-Meier; R; bias; competing risks; survival.

PubMed Disclaimer

Figures

Figure 1:
Figure 1:
LocalControlClassic() analysis describing the distribution of LTD estimates for the Lindner data set. As the number of clusters is increased, within-cluster patient similarity increases, and the estimated treatment outcomes trend towards the results found in the Kereiakes et al. study. The green line shows the percentage of the patients that fall within informative clusters, which decreases as much smaller clusters are created. Along the spectrum of cluster counts from 15 to 50, the average treatment difference across all clusters is lower than the $1512 uncorrected estimate.
Figure 2:
Figure 2:
Observed (red) vs. artificial (green) LTD empirical cumulative distribution functions generated using 30 clusters.
Figure 3:
Figure 3:
Adverse drug reaction as a function of weight and dosage. The ideal treatment for the simulated data should lie on the diagonal where weight (kg) = dosage (mg). The blue treatment has a higher variance than the red treatment. The pale points indicate patients with a greater adverse reaction to the treatment, while the dark points represent those with smaller reactions.
Figure 4:
Figure 4:
(Left) Histogram of adverse drug reaction outcome in the simulated data. The simulated data has the two drugs affect patients equally, however, it appears that the patients in the ‘Treatment 0’ group have a much better average outcome due to the lower variance in dosing. (Right) Corrected histogram of adverse drug reaction outcome in the simulated data. In this histogram, the estimated outcomes of T0 and T1 are not appreciably different after accounting for the bias of T1 having a higher variance in dosages. That is, when patients are clustered to have similar weight and dosage, the treatment difference approaches the true value of zero on average across all clusters.
Figure 5:
Figure 5:
Full factorial local control on the simulated data. This presents a graphical representation of the different covariate configurations. Each of the curves on the plot corresponds to one of the rows in Table 3. When both weight and dosage are included in the model (purple), the corrected treatment difference converges to the correct answer of zero. When only one of weight or dosage is used in the model (red or blue), or neither (green), then the biases remain, and the treatment difference estimate is non-zero. Because this simulated data contains no perfect matches, the corresponding section is excluded from this plot.
Figure 6:
Figure 6:
LocalControl() confidence estimates from 100 resamples. Confidence intervals are generated by repeatedly resampling N patients with replacement from the original population. LocalControl() is run once for each of the resampled populations, storing the results from each run as elements of a list. After 100 automated calls to LocalControl(), the 95% confidence intervals are drawn from the resampled results.
Figure 7:
Figure 7:
Treatment bias correction using local control on the survival simulation. Because of the treatment assignment bias, patients on A appear to have better outcomes than those on B (dotted lines on Kaplan-Meier plot). However, the local control corrected curves (solid lines) show the true treatment effect, that the two treatments are identical, when patients are clustered for similarity of age and BMI. The upper right subfigure shows a scatterplot of age and BMI in the survival simulation. The shading of points indicates the time to failure, with light shading corresponding to a short survival time, while darker points represent a longer survival time. The color of the points represents the treatment group of an observation. Blue and red points indicate whether a patient received treatment A or B, respectively.
Figure 8:
Figure 8:
Competing risks of hypertension and death among smokers and non-smokers in the Framingham Heart Study. The top plot shows the cumulative incidence without any correction for covariates. This biased estimate suggests that non-smokers have a higher risk for hypertension and lower risk of death. The bottom plot displays the results from local control after correcting for sex, cholesterol, age, BMI, heart rate, blood pressure, and blood glucose level. The competing risks local control bias-corrected curves show us that, among comparable patients, there is almost no difference in the rate of hypertension over time, but that the greater risk of death remains for smokers. The shaded areas represent the 95% confidence interval estimates.
Figure 9:
Figure 9:
Recursive partitioning tree. Using the results from the analysis in Section 3.4 as input to recursive partitioning, variables are identified which produce significant treatment differences. The color of the nodes is used to differentiate between the entire population (purple), subgroups containing only women (pink), and those with only male patients (blue). The dots bordering the leaves represent a second partitioning of men and women. Solid dots represent patients with a stent, while hollow dots represent those without. The LocalControl() outcomes for each of these subgroups are displayed in Figure 10.
Figure 10:
Figure 10:
Local control subgroup analysis. After identifying significant subgroups with recursive partitioning, the subgroup treatment differences are graphed as a function of radius. Observe that the men without stents have a much lower billing cost on Abciximab vs. control than each of the other subgroups.

References

    1. Addelman S (1969). “The Generalized Randomized Block Design.” The American Statistician, 23(4), 35–36. doi:10.2307/2681737. - DOI
    1. Auguie B (2017). gridExtra: Miscellaneous Functions for grid Graphics. R package version 2.3, URL https://CRAN.R-project.org/package=gridExtra.
    1. Austin PC (2014). “The Use of Propensity Score Methods with Survival or Time-to-Event Outcomes: Reporting Measures of Effect Similar to Those Used in Randomized Experiments.” Statistics in Medicine, 33(7), 1242–1258. doi:10.1002/sim.5984. - DOI - PMC - PubMed
    1. Austin PC, Schuster T (2016). “The Performance of Different Propensity Score Methods for Estimating Absolute Effects of Treatments on Survival Outcomes: A Simulation Study.” Statistical Methods in Medical Research, 25(5), 2214–2237. doi:10.1177/0962280213519716. - DOI - PMC - PubMed
    1. Bou-Hamad I, Larocque D, Ben-Ameur H (2011). “A Review of Survival Trees.” Statistics Surveys, 5(2011), 44–71. doi:10.1214/09-ss047. - DOI

LinkOut - more resources