BookmarkSubscribeRSS Feed
Melk
Lapis Lazuli | Level 10

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.

9 REPLIES 9
PGStats
Opal | Level 21

Interpret what estimates? From what model? On what data?

PG
Melk
Lapis Lazuli | Level 10
The parameter estimates from the model described above? Did I leave out anything important?
PGStats
Opal | Level 21

Yes, the SAS code and the data.

PG
Melk
Lapis Lazuli | Level 10
proc genmod data=dat;
class disease;
model er_visits = disease / dist = poisson
link = log
offset = logindexmonth;
run;

disease = a or b, er_visits is a count, and logindexmonth is the log of the number of months into the calendar year when the patient had their surgery. alternatively, I think I could also do the number of months left in left in the calendar year to reflect the follow up time but I was not sure which one would be more appropriate.
PGStats
Opal | Level 21

You should be using the log of the number of months during which the visits were counted for that patient as an offset.

PG
Melk
Lapis Lazuli | Level 10
Thank you! So I have an estimate statement for disease just looking at disease 1 -1, for disease a b. With the offset, I am not sure how to interpret the estimate. Does the offset change this?
PGStats
Opal | Level 21

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..

 

PG
Melk
Lapis Lazuli | Level 10
If I am interested in looking at the total number of ER visits within 3 months and then within 6 months in the calendar year, would I still be able to use this data and rely on the offset of log follow up time or do I need to eliminate patients who had a surgery in the last 3 month or 6 months of the calendar year since they would not have equivalent follow up time to those who had surgery earlier in the year?
StatDave
SAS Super FREQ

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;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 9 replies
  • 2461 views
  • 3 likes
  • 3 in conversation