Re: [R] monthly least squares estimation

2007-05-28 Thread Gabor Grothendieck
Here are three ways. The first uses a common error term and the others separate. They all give the same coefficient estimates. Lines <- "Month ExcessReturn Return STO 8 0.047595875 0.05274292 0.854352503 8 0.016134874 0.049226941 4.399372005 8 -0.000443869 0.004357305 -1.04980297 9

[R] monthly least squares estimation

2007-05-28 Thread Benoit Chemineau
Hi R-programmers ! I would like to perform a linear model regression month by month using the 'lm' function and i don't know how to do it. The data is organised as below: Month ExcessReturn Return STO 8 0.047595875 0.05274292 0.854352503 8 0.016134874 0.049226941 4.399372005 8 -0.000443