ace834
2010-Jan-30 23:14 UTC
[R] iterative regressions, adding a new line of data each time
Hi, I am pretty new to R. I'm trying run a regression repeatedly, adding a new data point each time, and then storing the predicted Y values. For example, let's say I have 500 data points and I run the regression. I would then like to store the Y value, run the regression again using 501 data points, store the new Y, run the regression with 502 data points, store the Y, and so on. What I would like is a new object that has all of the predicted Y values. I'm using time series data, and I'm running a multivariable regression. Any help would be greatly appreciated. Thanks. -- View this message in context: http://n4.nabble.com/iterative-regressions-adding-a-new-line-of-data-each-time-tp1457725p1457725.html Sent from the R help mailing list archive at Nabble.com.
Rolf Turner
2010-Feb-01 19:16 UTC
[R] iterative regressions, adding a new line of data each time
On 31/01/2010, at 12:14 PM, ace834 wrote:> > Hi, I am pretty new to R. I'm trying run a regression repeatedly, adding a > new data point each time, and then storing the predicted Y values. For > example, let's say I have 500 data points and I run the regression. I would > then like to store the Y value, run the regression again using 501 data > points, store the new Y, run the regression with 502 data points, store the > Y, and so on. What I would like is a new object that has all of the > predicted Y values. I'm using time series data, and I'm running a > multivariable regression. Any help would be greatly appreciated. Thanks.This would seem to be very easy to do using a for loop and a list. What is the problem? Is this a homework question? cheers, Rolf Turner ###################################################################### Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
ace834
2010-Feb-01 20:35 UTC
[R] iterative regressions, adding a new line of data each time
Thank you all for the help, and as a side note I'm not a student, so this isn't a homework assignement, I'm just new to R. -- View this message in context: http://n4.nabble.com/iterative-regressions-adding-a-new-line-of-data-each-time-tp1457725p1459260.html Sent from the R help mailing list archive at Nabble.com.
D Kelly O'Day
2010-Feb-01 22:53 UTC
[R] iterative regressions, adding a new line of data each time
I used rpanel() to do an interactive regression of a time series. My use was not as involved as yours, but it might give you an idea of how to approach. Here's a http://chartsgraphs.wordpress.com/2009/05/08/rpanel-package-adds-interactive-capabilites-to-r/ link to my blog post. -- View this message in context: http://n4.nabble.com/iterative-regressions-adding-a-new-line-of-data-each-time-tp1457725p1459360.html Sent from the R help mailing list archive at Nabble.com.