Des Mazis,

Sorry to bother you again, but I still couldn't figure it out.

My code is :
read.table("C:/.../dataset.txt")
library(zoo)
mydata=zoo(z)
fct_computeCoeffAndStats<-function(zooObject)
{
reg_lm=lm(y~f1+f2+f3+f4+f5,data=mydata)
reg_coeff=reg_lm$coefficients
reg_ci=confint(reg_lm,level=0.95)
dataToReturn = cbind(reg_coeff,reg_ci)
Return(as.numeric(dataToReturn))
}
rollapply(mydata, width=60, fct_computeCoeffAndStats,align="right")

The error message is:
Error in FUN(cdata[st, i], ...) : could not find function "Return"

I am not quite sure what to replace zooObject; I tried 'mydata' and 'z', but
unfortunately they didn't work.

Thanks again!

	[[alternative HTML version deleted]]

