[R] predict.lm() does not take ts objects in formula

Gabor Grothendieck ggrothendieck at gmail.com
Mon Feb 24 02:23:42 CET 2014


On Sun, Feb 23, 2014 at 7:40 PM, C W <tmrsg11 at gmail.com> wrote:
> Gabor,
> Your response worked perfectly,  list(t = 1, q = factor(1, 1:4) was what I
> couldn't figure out.  Thank you.
>
> In predict.lm(model, newdata), 2nd argument MUST be data.frame().  Why does
> list() also work?
>

Yes, it would be better to use a data.frame here to be consistent with
the documentation even though a list does work.

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com




More information about the R-help mailing list