From: Vivian Pun on 28 Dec 2009 17:28 Hi SAS users, When I analyze the rate of injury by hospital teaching status. I calculate the average injury rates by teaching status: Rate Rate ratio Teaching 26/1000 FTEs 26/18 = 1.44 Non-teaching 18/1000 FTEs reference I have tried two ways (there could be more ways) to import the injury count data into SAS. OPTION 1: use SAS datalines option such as: data data1; input teaching count total_fte; l_fte=log(total_fte); datalines; No 6041 332967.7441 Yes 12778 490319.0468 ; run; *This option is simple, but doesn't allow a more complicated model multivariate testing. OPTION 2: use count dataset that include breakdown of all variables, such as: year quarter count total_fte teaching bedcat .... 2002 3 23 2345 No 1 ..... 2004 1 100 100322 Yes 2 ..... *This option does allow a more complicated model multivariate testing. When I fit the data from either OPTION into a Poisson model, an crude univariate poisson regression model for the association between injury rate and teaching status shows that the model rate ratio from OPTION 1 is 1.44, model rate ratio from OPTION 2 is 1.33. I don't understand why the crude model rate ratio for OPTION 2 isn't 1.44 like the observed rate ratio or OPTION 1??? Any thoughts on this? Thank you. Vivian
From: Vivian Pun on 29 Dec 2009 08:27 On Dec 28, 5:28 pm, Vivian Pun <vivianpu...(a)gmail.com> wrote: > Hi SAS users, > > When I analyze the rate of injury by hospital teaching status. I > calculate the average injury rates by teaching status: > Rate Rate ratio > Teaching 26/1000 FTEs 26/18 = 1.44 > Non-teaching 18/1000 FTEs reference > > I have tried two ways (there could be more ways) to import the > injury count data into SAS. > OPTION 1: use SAS datalines option such as: > data data1; > input teaching count total_fte; > l_fte=log(total_fte); > datalines; > No 6041 332967.7441 > Yes 12778 490319.0468 > ; > run; > *This option is simple, but doesn't allow a more complicated > model multivariate testing. > > OPTION 2: use count dataset that include breakdown of all > variables, such as: > year quarter count total_fte teaching bedcat .... > 2002 3 23 2345 No > 1 ..... > 2004 1 100 100322 Yes > 2 ..... > *This option does allow a more complicated model multivariate > testing. > > When I fit the data from either OPTION into a Poisson model, an > crude univariate poisson regression model for the association between > injury rate and teaching status shows that the model rate ratio from > OPTION 1 is 1.44, model rate ratio from OPTION 2 is 1.33. I don't > understand why the crude model rate ratio for OPTION 2 isn't 1.44 like > the observed rate ratio or OPTION 1??? Any thoughts on this? Thank > you. For OPTION 1, my procedure code is proc genmod data=data1; class teaching (ref='No') / param=ref; model count = teaching /dist=poisson link=log offset=l_fte ; estimate 'Teaching' teaching 1/ exp; run; for OPTION 2, proc genmod data=data; class hosid teaching (ref='No') / param=ref; model count = teaching /dist=poisson link=log offset=l_fte ; repeated subject = hosid; estimate 'Teaching' teaching 1/ exp; run; (for option 2, because my surveillance data spans for 7 years and same 99 hospitals (hosid) each year, I use repeated measurement for hospitals.) Does it make sense?? Any thoughts on why the results from both OPTIONS using the same data differ?? Thank you. Vivian
|
Pages: 1 Prev: Observed rate ratio VS model rate ratio Next: Fw: extracting numbers from a string |