European Journal of Epidemiology

, Volume 31, Issue 6, pp 563–574 | Cite as

Regression standardization with the R package stdReg

  • Arvid Sjölander


When studying the association between an exposure and an outcome, it is common to use regression models to adjust for measured confounders. The most common models in epidemiologic research are logistic regression and Cox regression, which estimate conditional (on the confounders) odds ratios and hazard ratios. When the model has been fitted, one can use regression standardization to estimate marginal measures of association. If the measured confounders are sufficient for confounding control, then the marginal association measures can be interpreted as poulation causal effects. In this paper we describe a new R package, stdReg, that carries out regression standardization with generalized linear models (e.g. logistic regression) and Cox regression models. We illustrate the package with several examples, using real data that are publicly available.


Cox regression Hazard ratio Logistic regression Odds ratio Standardization 


  1. 1.
    Rothman K, Greenland S, Lash T. Mod Epidemiol. 3rd ed. Philadelphia: Lippincott Williams & Wilkins; 2008.Google Scholar
  2. 2.
    Gail M, Byar D. Variance calculations for direct adjusted survival curves, with applications to testing for no treatment effect. Biom J. 1986;28(5):587–99.CrossRefGoogle Scholar
  3. 3.
    Sjölander AAF. stdReg: Regression Standardization. R package version 0.1. 2016.Google Scholar
  4. 4.
    Dahlqwist E, Sjölander AAF. Model-based estimation of confounder-adjusted attributable fractions. R package version 0.1 2015.Google Scholar
  5. 5.
    Stefanski L, Boos D. The calculus of M-estimation. Am Stat. 2002;56(1):29–38.CrossRefGoogle Scholar
  6. 6.
    Breslow N, Day N. Statistical methods in cancer research. The analysis of case–control studies, vol. 1. Lyon: IARC/WHO; 1980.Google Scholar
  7. 7.
    van der Laan M. Estimation based on case–control designs with known prevalence probability. Int J Biostat. 2008;4(1):a17.Google Scholar
  8. 8.
    De Jong U, Breslow N, Hong G, Ewe J, Sridharan M, Shanmugaratnam K. Aetiological factors in oesophageal cancer in singapore chinese. Int J Cancer. 1974;13(3):291–303.CrossRefPubMedGoogle Scholar
  9. 9.
    Sjölander A, Vansteelandt S, Humphreys K. A principal stratification approach to assess the differences in prognosis between cancers caused by hormone replacement therapy and by other factors. Int J Biostat. 2010;6(1):a20.CrossRefGoogle Scholar
  10. 10.
    Breslow N. Discussion of the paper by D. R. Cox. J R Stat Soc B. 1972;34(2):216–7.Google Scholar
  11. 11.
    Sauerbrei W, Royston P, Look M. A new proposal for multivariable modelling of time-varying effects in survival data based on fractional polynomial time-transformation. Biom J. 2007;49(3):453–73.CrossRefPubMedGoogle Scholar
  12. 12.
    Sato T, Matsuyama Y. Marginal structural models as a tool for standardization. Epidemiology. 2003;14(6):680–6.CrossRefPubMedGoogle Scholar
  13. 13.
    Cole SR, Hernán MA. Adjusted survival curves with inverse probability weights. Comput Methods Progr Biomed. 2004;75(1):45–9.CrossRefGoogle Scholar
  14. 14.
    Robins J. Robust estimation in sequentially ignorable missing data and causal inference models. Proc Am Stat Assoc. 2000;1999:6–10.Google Scholar
  15. 15.
    Bai X, Tsiatis A, O’Brien S. Doubly-robust estimators of treatment-specific survival distributions in observational studies with stratified sampling. Biometrics. 2013;69(4):830–9.CrossRefPubMedGoogle Scholar
  16. 16.
    Robins J. A new approach to causal inference in mortality studies with a sustained exposure period—application to control of the healthy worker survivor effect. Math Model. 1986;7(9):1393–512.CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media Dordrecht 2016

Authors and Affiliations

  1. 1.StockholmSweden

Personalised recommendations