Lecture 22: Random effects modelsIndependence AssumptionHow to deal with it?Nurse staffing in ICU exampleRandom effects modelingAdding in the random effectWhat does this look like? Linear RegressionFitting Random Effects Models in RRandom Effects?InterpretationStataApplied exampleLecture 22:Random effects modelsBMTRY 701Biostatistical Methods IIIndependence AssumptionAll of the regression assumptions we’ve discussed thus far assume independenceThat is, patients (or other ‘units’) have outcomes that are unrelatedBut what if they are?•the same person is measured multiple times•people from the same house are studied•people treated in the same hospital are studied•different tumors within the same patient are evaluatedIn all of those examples, the independence assumption ‘falls apart’How to deal with it?Two main approaches:Random effects model:•include a ‘random intercept’ to account for correlation•individuals who are ‘linked’ (i.e., from same house, hospital, etc.) receive the same interceptGeneralized estimating equations (GEE)•model the correlation as part of the regression•two part modeling:mean modelcovariance modelNurse staffing in ICU exampleHospitals in MD from 1994-1996, discharge dataAll patients with abdominal aortic surgery (AAS)Goal: evaluate the association between the nurse-to-patient ratio in the ICU for risk of medical and surgical complications after AAS.Data:•patient outcomes (complications)•nurse:patient ratioIssue: patients treated within the same hospital are likely to have correlated outcomesRandom effects modeling),0(~)(logit)(logit21010NbNursebyNurseyjijjijiiStandard logisticmodelRandom effectslogistic modelAdding in the random effectConditional on the random effect, the observations within a hospital are independenceHence, independence is restored!Even so, random effects are considered ‘nuisance parameters’•we generally don’t care about them•they are necessary, but not interestingOur primary interest is still in β1What does this look like? Linear Regression0 2 4 6 8 102 4 6 8xyFitting Random Effects Models in Rlibrary(nlme)re.reg <- lme(y ~ x, random=~1|hospid)o.reg <- lm(y~x)bi <- re.reg$coefficients$random$hospidb0 <- re.reg$coefficients$fixed[1]b1 <- re.reg$coefficients$fixed[2]par(mfrow=c(1,1))plot(x,y)abline(o.reg)for(i in 1:20) {lines(0:10, b0+b1*(0:10) + bi[i], col=2)}abline(o.reg, lwd=2)Random Effects?Histogram of bibiFrequency-1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 2.00 1 2 3 4 5InterpretationRecall “nuisance” parametersIn most cases, we do not care about random intercepts“Fixed” effects are interpreted in the same way as in a standard regression modelStataxtreg: random effects linear regressionxtlogit: random effects logistic regressionxtpoisson: random effects poisson regressionstcox, ...shared(id): random effects Cox regressionAlso, ‘cluster’ option in many regression commands in StataApplied
View Full Document