Programming the statistical procedures from SAS

Proc Genmod offset vs. weight

Accepted Solution Solved
Reply
Contributor mcs
Contributor
Posts: 21
Accepted Solution

Proc Genmod offset vs. weight

I'd like to better understand the OFFSET and WEIGHT options in PROC GENMOD Poisson regression.  I'm using SAS/STAT 13.2.

 

Say I have a dataset with y observed counts, x1-x10 predictors, t time observed, and log_t.  What's the difference between the following two models?

 

proc genmod;
  model y = x1-x10 / d=p offset=log_t;
proc genmod;
  model y = x1-x10 / d=p;
  weight t;

 

Also, are there any differences when data is split across multiple observations, i.e., do I get the same result from fitting

  y  x1-x10  t

and

  y1  x1-x10 t1

  y2  x1-x10 t2

where y = y1 + y2, t = t1 + t2, and x1-x10 are the same?


Accepted Solutions
Solution
‎02-27-2017 09:39 AM
Super Contributor
Posts: 287

Re: Proc Genmod offset vs. weight

As @Ksharp says, offset and weight are two different things. Nevertheless, in Poisson regression and with "log" as link function, you can use weight or offset as you suggested to fit exactly same model.

 

It doesnt matter if you split one observation into two observations, if just the original time value equals the sum of the two new time values, and both new timevalues are greater than zero. Though, the fit statistics will give some different results. - This is not a problem since in such Poisson regression models the fit statistics are meaningless anyway.

View solution in original post


All Replies
Super User
Posts: 9,766

Re: Proc Genmod offset vs. weight

offset variable will fix its parameter at 1 always. It is usually taken as a measure unit. For example:
y=1 , log_t=2  means in two hours, event occur once.
y=2,  log_t=8 means in eight hours, event occur twice.

these two obs 's time interval is different, so you need take log_t as a offset variable(its parameter=1)


weight variable means this obs is measured more accurate and exactly .
Check Rick's blog , there are several blog have talked about it.

For your last question, I don't think you gonna get the same result.

Solution
‎02-27-2017 09:39 AM
Super Contributor
Posts: 287

Re: Proc Genmod offset vs. weight

As @Ksharp says, offset and weight are two different things. Nevertheless, in Poisson regression and with "log" as link function, you can use weight or offset as you suggested to fit exactly same model.

 

It doesnt matter if you split one observation into two observations, if just the original time value equals the sum of the two new time values, and both new timevalues are greater than zero. Though, the fit statistics will give some different results. - This is not a problem since in such Poisson regression models the fit statistics are meaningless anyway.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 218 views
  • 0 likes
  • 3 in conversation