I am running a Poisson model in sas comparing the number of ER visits after a surgery between 2 diseases in a given year. For those patients who were diagnosed later on in the year however, we have less follow up time to capture the ER visit so I decided to offset by the month of the surgery. I am wondering if someone may help in interpreting the estimates produced in the model with this offset term.
Interpret what estimates? From what model? On what data?
Yes, the SAS code and the data.
You should be using the log of the number of months during which the visits were counted for that patient as an offset.
The time unit that you choose for your offset calculation will determine the units of your estimates. For example, a Poisson process with mean 10 per month, during a varying number of months :
data test;
call streaminit(7);
do id = 1 to 20;
mth = rand("integer", 12);
logmth = log(mth);
logyr = log(mth/12);
n = rand("Poisson", mth*10);
output;
end;
run;
title "Time expressed in months";
proc genmod data=test;
model n = / dist=Poisson offset=logmth;
run;
title "Time expressed in years";
proc genmod data=test;
model n = / dist=Poisson offset=logyr;
run;
Notice how the exponentiated mean estimate is multiplied by 12 when offset is expressed in years instead of months..
Never throw away data. As shown in this note, if you use an LSMEANS statement as below (where LOGMONTHS is then log of the number of months each subject was observed), it will provide the estimated rate for each DISEASE. The estimated rate is the expected number of ER visits per month. From the estimated rate, you can get the number of visits for any number of months - just multiply by the number. For example, if the rate is 2 and you want the expected number of visits in 3 months, then the answer is 6.
proc genmod data=dat;
class disease;
model er_visits = disease / dist = poisson offset=logmonths;
lsmeans disease / ilink cl;
run;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.