Re: [Rd] using predict method with an offset

2009-03-01 Thread Prof Brian Ripley
The para quoted dates from before the stats package was split off in 2003, and is historical (it was true at one point, but not in R 2.0.0, the earliest running version I have). There is however still some truth lurking there: the code is offset <- if (!is.null(off.num <- attr(tt, "off

Re: [Rd] using predict method with an offset

2009-02-27 Thread Heather Turner
Hi Ken, First of all, whether you specify the offset by the argument or in the formula, your code requires that q25 is the same length as the variable Contr. You can set this up by defining your new data as follows: nd <- data.frame( Contr = cc , q25 = qlogis(0.25)) This sorts out the problem of

[Rd] using predict method with an offset

2009-02-26 Thread Kenneth Knoblauch
Hi, I have run into another problem using offsets, this time with the predict function, where there seems to be a contradiction again between the behavior and the help page. On the man page for predict.lm, it says Offsets specified by offset in the fit by lm will not be included in predictions,