Dear Ox-users,
For a bootstrap procedure, I would like to do multiple ols
regressions. I have stacked my regressand obs. Y_(i) in a T(sample
size) x N (no bootstraps) matrix Y. Further, I have stacked my
regressors obs. X_(i) (dim. T x k) in a matrix X (dim. T x
N*k). I would like to compute now, a matrix B containing as
column vectors the ols estimators of Y_(i) on X_(i) for all
i. For now I only get this working using loops. Another
possibility is using kronecker products to transform X and
writing it in matrix multiplications. This approach, however,
does not work when the dimension are too large, which is quickly
the case. Does anybody know a clever way to solve this problem?
Related problem:
Suppose, I have a N matrices X_(i) of dimension T x k and N vectors
Y_(i) of dimension k x P. I would like to have a function that
creates N matrices Z_(i) = X_(i) * Y_(i) of dimension T x P without
using any loops, to speed up the calculation. I know it can be done
using kronecker products, but for reasonable values of N,k,P I run
into memory problems. In particular, think of T and N approximately
1000, and k approximately 10.
Regards,
Jeroen Kerkhof
*******************************************************
Jeroen Kerkhof
Department of Econometrics and CentER
Tilburg University, The Netherlands
Office B1002
PO box 90153
5000 LE Tilburg
tel: +31-13-4662134
fax: +31-13-4663280
e-mail: [log in to unmask]
e-mail2: [log in to unmask]
web: http://cwis.kub.nl/~few5/center/phd_stud/kerkhof/
*******************************************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|