Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Federico Belotti <f.belotti@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: anyone using xsmle-pls help |
Date | Wed, 15 May 2013 15:51:11 +0200 |
Dear Ken Your conformability error is due to the size of the spatial weights matrix. -xsmle- requires a (n x n) matrix of spatial weights, where n is the number of units (in your case n=30). This matrix can be a Stata matrix or a -spmat- object and it may follow any spatial weighting scheme, though it is usual to normalize spatial weights so that either the row or column sums are equal to 1. Furthermore, -xsmle- does not allow the use of multiple W. This means that the spatial weights matrix is forced to be the same for each cross-section and the command will automatically replicate it for all time periods. The reason why -xsmle- allows the use of -spmat- objects is to overcome Stata's matrix limits (which depends on Stata's flavor: 40x40 (Small) 800x800 (IC) and 11,000x11,000 (SE or MP)). Thus, bigger matrices can be specified as -spmat- objects. HTH, Federico On May 15, 2013, at 3:19 PM, ken first wrote: > Dear Stata users, > > could someone please help with this matrix problem? I got this message > when using xsmle. > > > I have a panel data for 10 years and 30 regions. > > > > First, I have created a panel matrix using spawmat. The matrix is > similar to the sample file you provided. > > > > =93spatwmat, name(abc) xcoord( longitude ) ycoord( latitude ) band(0 5) > standardize > > > > 1. Inverse distance weights matrix abc (row-standardized) > > Dimension: 300x300 > > Distance band: 0 < d <=3D 5 > > Friction parameter: 1 > > Minimum distance: 0.0 > > 1st quartile distance: 7.8 > > Median distance: 12.2 > > 3rd quartile distance: 17.6 > > Maximum distance: 47.1 > > Largest minimum distance: 14.14 > > Smallest maximum distance: 24.60 > > > > Beware! 30 locations have no neighbors > > You are advised to extend the distance band =93 > > > > > > 2. I have then use xsmle and received the following message > > > > xsmle variable a b c d, wmat(abc) > > > > *: 3200 conformability error > > _xsmle_est(): - function returned error > > <istmt>: - function returned error > > > > I have also converted the stata matrix into a spmat file and still get the > same message. > > > > I have also tried to use spmat to create matrix as the help indicates but > spmat seems to be for creating matrices for cross sectional data. > > > > > > It would be highly appreciated if you could help with this. thank you in > advance . > > Ken > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ -- Federico Belotti, PhD Research Fellow Centre for Economics and International Studies University of Rome Tor Vergata tel/fax: +39 06 7259 5627 e-mail: federico.belotti@uniroma2.it web: http://www.econometrics.it * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/