[R] predict.lm() does not take ts objects in formula
Gabor Grothendieck
ggrothendieck at gmail.com
Mon Feb 24 01:32:14 CET 2014
On Sun, Feb 23, 2014 at 7:25 PM, C W <tmrsg11 at gmail.com> wrote:
> Gabor,
> Let me change newdata since it's confusing.
>
> Suppose I want to predict, year 1990, and quarter 2.
>> newdata <- data.frame(c(1990, 1, 0, 0)
>
> Since Q1 is a baseline, we will only see Q2, Q3, Q4. So, 4 parameters in
> total.
>
The formula:
tsdata ~ t + q
regresses tsdata on t and q so if you come up with a new value of t and a new
value q you can make a new prediction. The year is not one of those
two variables.
If that is the model you want then you must specify a t and a q as in
my last response.
--
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