[R] Rolling regressions with sample extended one period at a time
pie'
tcpietro at yahoo.it
Fri Mar 16 13:12:33 CET 2012
hey,
thanks for the hint. I too figured I'd have to write a for-loop. I have the
problem now of how to extract the single element of the fitted values
vector. For example, run 1 of the regression generates 80 fitted values, run
2 generates 81 fitted values, run 3 produces 82 fitted values and so on. I
need to extract the 80th, 81st, 82nd (all the last values generated at every
run) value into a separate vector. I know that lm (and glm) provides a
specific function for extracting the predicted values but I don't know how
to use it inside a loop. Can you suggest anything?
P.
--
View this message in context: http://r.789695.n4.nabble.com/Rolling-regressions-with-sample-extended-one-period-at-a-time-tp4470316p4478016.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list