Re: [R] regression using GMM for mulltiple groups

2011-10-25 Thread Dennis Murphy
There are a few ways to do this. One is to use the lmList() function in the nlme package and use conditioning in the model formula. Another is to use the plyr package to create a list of models from which you can extract pieces of output from each model fit to the data subsets; for example, librar

[R] regression using GMM for mulltiple groups

2011-10-25 Thread Sherlene Enriquez-Savery
Inthe code below I was trying to to obtain the GMM estimates for CAPM (REGRESSION) for 36 stocks each have 180 observations,however it only gives me one output rather than 36. In SAS i would just put in a *By statement*. I have a variable TICKER that categorize them into 36 groups. *How can I o