Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: 'xtgls' for panels that exceed matsize limit

From   Ramona Meyricke <>
Subject   st: 'xtgls' for panels that exceed matsize limit
Date   27 Nov 2011 21:43:58 +0000

Hello, I have an unbalanced panel of 1,248,000 observations on 10,853 individuals for up to 264 months. I want to run panel regressions allowing for cross sectional dependence using 'xtgls' and 'xtmg'.

'xtreg' works on this panel OK, but 'xtgls' and 'xtmg' do not work and return the error: "matsize too small - should be at least 10625". I am using STATA IC, so the max matsize I can get is 800. I tried bootstrapping with size(800) to try and get 'xtgls' and 'xtmg' working on a bootstrapped sample within a matsize limit of 800, but can't get this working. The command:

bootstrap, size(800) cluster(gvkey2) idcluster(newid) : xtgls y MktRF RF, i(newid)

returns the same error "matsize too small - should be at least 10625". (But I can get the same command working when I draw 800 IDs and run xtgls on the sub-sample generated by: bsample 800, cluster(gvkey2) idcluster(newID)).

Is it possible to get bootstrap working with xtgls with over 800 individuals? Or is there another way to run panel regressions controlling for cross-sectional dependence on this panel? (I have never programmed in MATA, so would like to stick to STATA if possible.)

Many Thanks, Ramona

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index