0

I have a linear regression model that includes Ut as the error term. It has been requested to generate Ut's for 200 future periods (t=1...200). How would I do this in R? I'm assuming this is a time series problem but am unsure of how to implement.

  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input that can be used to test and verify possible solutions. What assumptions are you making for your predictions? – MrFlick Oct 22 '18 at 19:39
  • Okay! I'm running a regression: reg1 = lm(logcons~loginc, data=consumption), where logcons is the log of a consumption variable and loginc is the log of an income variable...I'm assuming Independent and Identically Distributed Random Variables and hoping to get results similar to the regression results with stargazer: stargazer(reg1, se=list(cse(reg1)), title="Term Paper Regressions", type="text", df=FALSE, digits=2) with residuals included but as a forecast for 200 future periods. Hoping to find out the most efficient way to do this. – Chris Sawyer Oct 22 '18 at 21:56
  • It's better if you put the code into the question (rather than a comment) so it can be properly formatted. Also, it helps if you include sample data so we can actually run the code. I was assuming "ut" was some variable in your model but that does not seem to be the case. What does "ut" stand for in this case? – MrFlick Oct 23 '18 at 15:07

0 Answers0