Hi everyone

I need to calculate abnormal returns for different events applying event study 
methodology. I must create a market model in order to perform the analysis. I 
apply regression analysis to get OLS estimators.

I have a problem to create a linear regression which I could repeat for each 
column in two different data frames (one with explainatory and one with 
explaning variables). It means that I want to regress column 1 from first data 
frame with column 1 from second data frame,, clumn two with column two etc. I 
tried to use the following code:#x  is matrix containing stock returns
y is matrix containing market index                           
i<-1:length(x)
t[i] <- lapply(t[i], lm(x[,1]~y[,i]))

but it is not working.

Could anybody help me?

Thanks a lot

Iza

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to