hey all, i'm *very* new to R, so i apologize in advance if i'm asking 
too simple a question. i'm basically trying to solve for excess returns 
(ie, ALPHA) based on rolling betas.

here's the story: after some wrangling, i finally got R to do rolling 
regressions. in two ways, actually:

first method:
beta<-rollapply(m1, width=5, FUN = function(x) coef(lm(y1 ~ y2, 
data=as.data.frame(x))),by.column=FALSE, align="right")

second method, using dr bates' fantastic code for movingWindow2():
beta2<-movingWindow2(y1 ~ y2, m1, 5)

(each method spits out slightly different *types* of data, though the 
numbers all match up, mercifully.)

now, i've been looking through zivot and wang's book on financial time 
series in S-PLUS, and they do this nifty rolling prediction on the 
output of their earlier rolling regressions:

predict(roll.fit, n.steps=1)

is there a way to do this in R? that is, given my calculated "beta" 
variables above, is there a way to go through my time series data and 
form the proper n-step ahead predictions?

thanks for any help!
bryan

-- 
Bryan Lim
PhD Candidate
Department Of Economics
University Of California, Santa Barbara



	[[alternative HTML version deleted]]

