Re: [R] glm: offset

2008-03-03 Thread Prof Brian Ripley
On Mon, 3 Mar 2008, [EMAIL PROTECTED] wrote: > On 03-Mar-08 03:19:01, Wensui Liu wrote: >> HI, John, >> my understanding is that you should use log(...) instead of its >> original scale. Below is the logic in the case of poisson reg. >> log(y / offset) = x'b >> => log(y) - log(offset) = x'b >> =>

Re: [R] glm: offset

2008-03-02 Thread Ted Harding
On 03-Mar-08 03:19:01, Wensui Liu wrote: > HI, John, > my understanding is that you should use log(...) instead of its > original scale. Below is the logic in the case of poisson reg. > log(y / offset) = x'b > => log(y) - log(offset) = x'b > => log(y) = x'b + log(offset) Well, this is where it get

Re: [R] glm: offset

2008-03-02 Thread Simon Blomberg
Yes, use the log. I've had the same problem in the past, too. Try it on a toy example to confirm it for yourself. Cheers, Simon. On Sun, 2008-03-02 at 22:01 -0500, John Sorkin wrote: > R 2.6.0 > Windows XP > > A question about running a generalized linear model. > > I am running a glm with > (

Re: [R] glm: offset

2008-03-02 Thread Wensui Liu
HI, John, my understanding is that you should use log(...) instead of its original scale. Below is the logic in the case of poisson reg. log(y / offset) = x'b => log(y) - log(offset) = x'b => log(y) = x'b + log(offset) On Sun, Mar 2, 2008 at 10:01 PM, John Sorkin <[EMAIL PROTECTED]> wrote: > R 2.

[R] glm: offset

2008-03-02 Thread John Sorkin
R 2.6.0 Windows XP A question about running a generalized linear model. I am running a glm with (1) a poisson distribution and a log link: family=poisson(link = "log") and an offset. I would like to know if I should express the offset as the log of the offset value, i.e. offset=log(NumUniqPt)