Hi,

I'm exploiting district-level unbalanced panel data.
I used the following command to generate a weight matrix w
HTML Code:
spwmatrix gecon _CY _CX , wname(w) wtype(inv) cart dband(0 100) rowstand
And afterward, it said-
HTML Code:
Inverse distance (alpha = 1) spatial weights matrix (13892 x 13892) calculated successfully and the following action(s) taken:

 - Spatial weights matrix  created as Stata object(s): w.

 - Spatial weights matrix has been row-standardized.
Now I want to use
HTML Code:
xtmoran RYield, wname(w)
where w needs to be in dta format.

I don't know how to export the above-generated weight matrix as dta file.
I can't find the appropriate code.

Can you please advise,

Thank you,