Skip Navigation U.S. Department of Health and Human Services www.hhs.gov
Agency for Healthcare Research Quality www.ahrq.gov
www.ahrq.gov


Appendix Table 3. SAS Code for the Meta-Analysis of Serious Complications

The following SAS code shows how to calculate the combined rate of total serious complications and examines the impact of Community_setting (1 = Yes, 0 = No) on total serious complication rate using a logistic random-effects model with PROC NLMIXED.

Data totalSC; input Study $ n_proc n_serious_tot Community_setting
/* Community_setting = 1 if the study was conducted in a community setting; 0, otherwise */
Datalines
Kewenter_1996 190 3 0
Robinson_1999 1474 7 1
Thiis_1999 521 1 0
Nelson_2002 3196 18 0
Segnan_2002 775 2 0
Pickhardt_2003 1233 1 0
Cotterill_2005 324 0 1
Ko_2006 502 8 0
Levin_2006 16318 44 1
Rathgaber_2006 12407 14 1
Ko_2007 18271 45 1
Johnson_2008 2531 2 1

/** To obtain a combined rate of total serious complication rate */

proc nlmixed data = totalSC;
parms beta0 = -7.0 s2u = 0.5; /* Specify the initial value */
eta = beta0 + u;
/* Specify the model on logit scale where beta0 will be used to estimate combined complication rate, and u is the random-effects term across studies */

expeta = exp(eta);
p = expeta/(1+expeta);
model n_serious_tot ˜ binomial(n_proc,p);
/* Specify the distribution for the number of complications */

random u ˜ normal(0,s2u) subject=study; /* Specify the distribution of random effects */

estimate "Complication Rate" exp(beta0)/(1+exp(beta0));
/* Obtain the combined complication rate using beta0 */
run;

/** To examine the impact of community setting on the total serious complication rate */

proc nlmixed data = totalSC;
parms beta0 = -7.0 s2u = 0.5 beta1 = 0.5; /* Specify the initial values */
eta = beta0 + beta1 * Community_setting + u;
/* Impact of community setting is investigated by beta1*/

expeta = exp(eta);
p = expeta/(1+expeta);
model n_serious_tot ˜ binomial(n_proc,p);
/* Specify the distribution for the number of complications */

random u ˜ normal(0,s2u) subject=study;
/* Specify the distribution of random effects */
run

Return to Document

 

AHRQ Advancing Excellence in Health Care