Journal of Biostatistics and Epidemiology 2017. 3(3-4):76-82.

Generation of data with specific marginal risk difference
Kazem Mohammad, Mohammad Ali Mansournia, safoora gharibzadeh


Background & Aim: Simulation studies are important statistical tools to investigate the performance of statistical models in specific situations. For a binary outcome and exposure, one of the most important statistical measures will be the risk difference (RD). To assess the quality of estimators in estimating the effect of the exposure, a data set with a specific effect measure is require.
Methods & Materials: Monte Carlo simulation can be helpful in situations when there is a proper data  generating  process.  In  this  paper,  another  technique  will  be  presented  to  generate  data  with specific marginal risk difference (MRD). 
Results: Convergence of simulation methods in the same scenario reached in a few iterations using the proposed method. 
Conclusion:  The  proposed  method  is  recommended  over  the  current  method  due  to  less  time consumption; this issue is important in studies with different scenarios. 


Data systems; Risk ratio; Causality; Computer simulation; Monte Carlo method

Full Text:



Austin PC. A data-generation process for data with specified risk differences or numbers needed to treat. Commun Stat Simul Comput 2010; 39(3): 563-77.

Gharibzadeh S, Mohammad K, Rahimiforoushani A, Amouzegar A, Mansournia MA. Standardization as a tool for causal inference in medical research. Arch Iran Med 2016; 19(9): 666-70.

Hernan MA, Robins JM. Estimating causal effects from epidemiological data. J Epidemiol Community Health 2006; 60(7): 578-86.

Leemis LM, Shih LH, Reynertson K. Variate generation for accelerated life and proportional hazards models with time dependent covariates. Stat Probab Lett 1990; 10(4): 335-9.

Austin PC, Stafford J. The performance of two data-generation processes for data with specified marginal treatment odds ratios. Commun Stat Simul Comput 2008; 37(6): 1039-51.

Bender R, Augustin T, Blettner M. Generating survival times to simulate Cox proportional hazards models. Stat Med 2005; 24(11): 1713-23.

Lunn AD, Davies SJ. A note on generating correlated binary variables. Biometrika 1998; 85(2): 487-90.

Austin PC. Generating survival times to simulate Cox proportional hazards models with time-varying covariates. Stat Med 2012; 31(29): 3946-58.

Mansournia MA, Greenland S. The relation of collapsibility and confounding to faithfulness and stability. Epidemiology 2015; 26(4): 466-72.

Balzer LB, Laan MJ. Estimating effects on rare outcomes: Knowledge is power [Online]. [cited 2013]; Available from: URL: 310

Rosenblum M, van der Laan MJ. Simple Examples of Estimating Causal Effects Using Targeted Maximum Likelihood Estimation [Online]. [cited 2010]; Available from: URL: 262

Bender R, Kuss O. Methods to calculate relative risks, risk differences, and numbers needed to treat from logistic regression. J Clin Epidemiol 2010; 63(1): 7-8.

Bender R, Blettner M. Calculating the "number needed to be exposed" with adjustment for confounding variables in epidemiological studies. J Clin Epidemiol 2002; 55(5): 525-30.

Zhang J, Yu KF. What's the relative risk? A method of correcting the odds ratio in cohort studies of common outcomes. JAMA 1998; 280(19): 1690-1.


  • There are currently no refbacks.

Creative Commons Attribution-NonCommercial 3.0

This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License which allows users to read, copy, distribute and make derivative works for non-commercial purposes from the material, as long as the author of the original work is cited properly.