Hello, fellow SAS Users! I am reaching out to you for help as I begin to learn how to analyze a somewhat complicated set of data. I am trying to do an analysis to see if an increase in variable X results in a statistically significant increase in my dependent variable, y, which is a count of the number of events variable, while controlling for other variables, say z1 through z5. The dataset contains measurements (y) on patients at various hospitals and patients are measured anywhere between 1 and 10 times over the course of a year at different time points (not on any standardized or regularly scheduled intervals). I expect measurements within each hospital to be correlated as the standards of care for each hospital may be different and I also expect each patient's measurements to be correlated and nested within patient, within hospital. I was hoping to use a negative binomial model (or Poisson) to model the counts because at the end of the day, I'd like to be able to say something like, a one unit increase in X results in a 16% increase in the Y, on average, holding all other variables constant (and controlling for hospital and those other variables) . I am struggling with how to properly set this model up in SAS. Every patient in my dataset has a unique ID as well as the hospital they went to, along with their other covariates and patients could go to various hospitals and be measured (although their patient ID would remain the same regardless of the hospital they went to). I am looking for assistance on what might be an appropriate model to use and how to set this up in SAS. I read a bit about setting this up using general estimating equations (GEE) or perhaps even proc glimmix, but I'm not sure what the best approach is here. I tried setting this up as follows, but I'm not sure if this would be correct: proc genmod data = mypatients; class hospital patientID /param=glm; model y = X z1 z2 z3 z4 z5 / type3 dist=nb link=log; store p1; repeated subject=patientID; run; Does this seem right? It seems I'm neglecting the nesting of measurements within patients and patients within hospitals with this approach. I'd very much appreciate any guidance or insight others might have. Thanks so much,in advance,for your assistance.
... View more