Hello I am trying to use predict.lm, but I am having trouble getting out of
sample predictions. I am getting the same output if I use the following
three commands:

predict(ModeloLineal,predictors[721:768,])
predict(ModeloLineal,predictors[1:768,])
predict(ModeloLineal)

where ModeloLineal is the output from ModeloLineal<-lm(dataTS[,6] ~
predictors[1:720,]), so the first 720 observations of predictors i would
like to use them to build my model and the other 48 I would like to use them
to have an out of sample forecast, Do you know how can I do this?

Thank you

Felipe Parra

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to