On Wed, 10 Mar 2010, Peter Blömeke wrote:
So far I have I have developed my problem as follows:
My data consists of monthly stockreturns of 612 companies and corresponding
indexreturns of two stock indices. My data is organized as "stacked cross
section": All return of the first month of all 612 companies among each
other and then of the second month below that and so on. It is
110160x3-matrix.
Gretl should run 612 times one regression. So it would look roughly like
this: stockreturn = beta0 + beta1*indexreturn1 + beta2*indexreturn2 +
errorterm
In the end I need a 612x2-matrix with all beta1 and beta 2 coefficients.
If the index returns are the same in all regressions, you may want to
reshape your dataset like this
date company1 company2 ... company611 company612 index1 index2
... your data here ...
and then do
list Y = company*
list X = const index1 index2
matrix B = mols({Y}, {X})
matrix B = B[2:3,]'
of course, you'd have to reshape your data to a pure time-series format
(as opposed to panel), which is probabily going to be tedious, but having
done that, the rest should take you just a few seconds.
Riccardo (Jack) Lucchetti
Dipartimento di Economia
UniversitĂ Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti