Easy SAS Calculations for Risk or Prevalence Ratios and Differences
2005/06/29 by D. Spiegelman, Donna Spiegelman · 1,759 citations
Engineering · Mathematics · Medicine · #Demography #Epidemiology #Internal medicine #Mathematics #Medicine #SAS software applications and methods #Statistics
paper · pdf · doi:10.1093/aje/kwi188
published in American Journal of Epidemiology 162(3), 199-200 (Oxford University Press)
openalex publication_date 2005/06/29 · openalex created_date 2025/10/10 · openalex updated_date 2026/08/05
Abstract
We would like to make the readership aware that risk or prevalence ratios and differences, when they are the parameter of interest, can be directly calculated by using SAS software (SAS Institute, Inc., Cary, North Carolina). There is no longer any good justification for fitting logistic regression models and estimating odds ratios when the odds ratio is not a good approximation of the risk or prevalence ratio. Instead, SAS PROC GENMOD's log-binomial regression (1) capability can be used for estimation and inference about the parameter of interest. Here is an example of the code required to analyze the breast cancer survival data discussed by Greenland (2):from which the multivariate-adjusted risk ratios are 1.5583 (95 percent confidence interval: 1.0487, 2.3155), 2.5382 (95 percent confidence interval: 1.1734, 5.4903), and 5.8680 (95 percent confidence interval: 2.7458, 12.5406) for receptor, stage2, and stage3, respectively. The results from the SAS output are given without rounding to allow replication by the reader. proc genmod descending; model death=receptor stage2 stage3/dist=bin link=log; estimate ‘RR receptor low vs. high’ receptor 1/exp; estimate ‘RR stage2 vs stage1’ stage2 1/exp; estimate ‘RR stage 3 vs stage1’ stage3 1/exp; There are times when the log-binomial model fails to converge. It is well known that the log-binomial model is less numerically stable than the logistic model. When this is the case, the analyst may use SAS PROC GENMOD's Poisson regression capability with the robust variance (3, 4), as follows:from which the multivariate-adjusted risk ratios are 1.6308 (95 percent confidence interval: 1.0745, 2.4751), 2.5207 (95 percent confidence interval: 1.1663, 5.4479), and 5.9134 (95 percent confidence interval: 2.7777, 17.5890) for receptor, stage2, and stage3, respectively. Note that, on average, the modified Poisson estimates are valid but not fully efficient when compared with these log-binomial maximum likelihood estimators. In this particular example, the theoretical efficiency of the log-binomial maximum likelihood estimates is clearly evident. proc genmod; class id; model death=receptor stage2 stage3/dist=poisson link=log; repeated subject=id/type=ind; estimate ‘RR receptor low vs. high’ receptor 1/exp; estimate ‘RR stage2 vs stage1’ stage2 1/exp; estimate ‘RR stage 3 vs stage1’ stage3 1/exp; By replacing link=log with link=identity in the MODEL statement, multivariate-adjusted risk (prevalence) differences are obtained as follows:from which the multivariate-adjusted risk differences are 0.1613 (95 percent confidence interval: 0.0069, 0.3158), 0.1492 (95 percent confidence interval: 0.0367, 0.2618), and 0.5723 (95 percent confidence interval: 0.3842, 0.7604) for receptor, stage2, and stage3, respectively. If this binomial model for the risk difference fails to converge, the modified Poisson approach can be used as above, again replacing link=log with link=identity:As noted previously, these modified Poisson risk differences will be valid, but they tend to be less efficient than their binomial maximum-likelihood-based counterparts. proc genmod descending; model death=receptor stage2 stage3/dist=bin link=identity; proc genmod; class id; model death=receptor stage2 stage3/dist=poisson link=identity; repeated subject=id/type=ind; A well-documented, user-friendly SAS macro, %RELRISK8, has been developed that automates this computational and analytic approach. The modified Poisson estimates are used to start the iterations to obtain the log-binomial maximum likelihood estimates. These are the final estimates if convergence of the binomial likelihood is not obtained. The macro can be downloaded from the first author's website (http://www.hsph.harvard.edu/faculty/spiegelman/relrisk8.html). Conflict of interest: none declared.
Citations
Cited by
- A Modified Least-Squares Regression Approach to the Estimation of Risk Difference
- Metabolically healthy general and abdominal obesity are associated with increased risk of hypertension
- Statin Prescriptions and Breast Cancer Recurrence Risk: A Danish Nationwide Prospective Cohort Study
- Rural and Urban Disparity in Health Services Utilization in China
- Difference-in-Difference in the Time of Cholera: a Gentle Introduction for Epidemiologists
- Willingness to disclose sexual orientation and gender identity on federal government surveys: A community-based research study with gay, bisexual, transgender, and queer men and nonbinary and Two-Spirit people in Canada
- Childhood Gender Nonconformity and Intimate Partner Violence in Adolescence and Young Adulthood
- Relative Risk Estimation in Randomized Controlled Trials: A Comparison of Methods for Independent Observations
- Odds Ratio or Prevalence Ratio? An Overview of Reported Statistical Methods and Appropriateness of Interpretations in Cross-sectional Studies with Dichotomous Outcomes in Veterinary Medicine
- Association of Public Health Interventions With the Epidemiology of the COVID-19 Outbreak in Wuhan, China
- Ruptured Tendons in Anabolic-Androgenic Steroid Users
- Prenatal exposure to antibiotics, cesarean section and risk of childhood obesity
- A Prospective Cohort Study of Technique and Technology Used to Improve First Time PIVC Insertion Success in Hospitalised Paediatric Patients
- Frustration in healthcare: Sex differences in parental perceptions of medical visits for autistic children
- Estimating confidence regions of common measures of (baseline, treatment effect) on dichotomous outcome of a population
- Performance of a score to characterise adequate contact among the social network of persons with TB
- 大学生における摂食障害傾向 : 摂食障害診断質問紙EDE-Q 6.0を用いて
- Monte Carlo error in the Bayesian estimation of risk ratios using log-binomial regression models: an efficient MCMC method
- Development of production sequencing software for industry
- Motorcycle protective clothing: Protection from injury or just the weather?
- Cardiovascular conditions, hearing difficulty, and occupational noise exposure within US industries and occupations
- Nine-Year Risk of Depression Diagnosis Increases With Increasing Self-Reported Concussions in Retired Professional Football Players
- Trends in worker hearing loss by industry sector, 1981–2010
- Physical Functional Limitations among Aboriginal and Non-Aboriginal Older Adults: Associations with Socio-Demographic Factors and Health
- Availability of recreational resources in minority and low socioeconomic status areas. [europepmc]
- Associations of the local food environment with diet quality--a comparison of assessments based on surveys and geographic information systems: the multi-ethnic study of atherosclerosis. [europepmc]
- A comparison of two methods for estimating prevalence ratios. [europepmc]
- Neighborhood food environment and walkability predict obesity in New York City. [europepmc]
- Socioeconomic inequality in the prevalence of autism spectrum disorder: evidence from a U.S. cross-sectional study. [europepmc]
- Dieting and disordered eating behaviors from adolescence to young adulthood: findings from a 10-year longitudinal study. [europepmc]
- The effect of mobile phone text-message reminders on Kenyan health workers' adherence to malaria treatment guidelines: a cluster randomised trial. [europepmc]
- Incident stroke and mortality associated with new-onset atrial fibrillation in patients hospitalized with severe sepsis. [europepmc]
- Web-based recruiting for health research using a social networking site: an exploratory study. [europepmc]
- Prevalence and impact of pain among older adults in the United States: findings from the 2011 National Health and Aging Trends Study. [europepmc]
- Prenatal exposure to antibiotics, cesarean section and risk of childhood obesity. [europepmc]
- Mental health of transgender youth in care at an adolescent urban community health center: a matched retrospective cohort study. [europepmc]
- Aflibercept, bevacizumab, or ranibizumab for diabetic macular edema. [europepmc]
- Panretinal Photocoagulation vs Intravitreous Ranibizumab for Proliferative Diabetic Retinopathy: A Randomized Clinical Trial. [europepmc]
- Motivations Associated With Nondisclosure of Self-Reported Concussions in Former Collegiate Athletes. [europepmc]
- Family Perspectives on Aggressive Cancer Care Near the End of Life. [europepmc]
- Aflibercept, Bevacizumab, or Ranibizumab for Diabetic Macular Edema: Two-Year Results from a Comparative Effectiveness Randomized Clinical Trial. [europepmc]
- A Prospective Study of Chronic Pain after Thoracic Surgery. [europepmc]
- Effect of Community Health Worker Support on Clinical Outcomes of Low-Income Patients Across Primary Care Facilities: A Randomized Clinical Trial. [europepmc]
- Neural-Tube Defects and Antiretroviral Treatment Regimens in Botswana. [europepmc]
- Association of Public Health Interventions With the Epidemiology of the COVID-19 Outbreak in Wuhan, China. [europepmc]
- Characteristics and Outcomes of US Children and Adolescents With Multisystem Inflammatory Syndrome in Children (MIS-C) Compared With Severe Acute COVID-19. [europepmc]
- Underlying Medical Conditions Associated With Severe COVID-19 Illness Among Children. [europepmc]
- Mortality, In-Hospital Morbidity, Care Practices, and 2-Year Outcomes for Extremely Preterm Infants in the US, 2013-2018. [europepmc]
- Risk of hospitalisation associated with infection with SARS-CoV-2 omicron variant versus delta variant in Denmark: an observational cohort study. [europepmc]
Related