use "E:\stata\mywork\c.dta", clear,调入一个截面权重
spmat dta WW var*, normalize(row) replace,行标准化
spmat save WW using WW.spmat,replace,保存为面板权重
use "E:\stata\mywork\2000-2012.dta", clear,调入面板数据
spmat use WWW using "WW.spmat",使用权重作为空间面板用
你试试
运行命令:
. spwmatrix gecon latitude longitude, wname(wecon) wtype(econ) econvar(manugrp) rowstand xport(wecon,txt)
Economic distance spatial weights matrix (285 x 285) calculated successfully and the following action(s) taken:
- Spatial weights matrix created as Stata object(s): wecon.
- Spatial weights matrix has been row-standardized.
- Spatial weights matrix saved to .txt file, F:\Stata12/wecon.txt, for use with other Stata packages.
这时应该已经生成了权重矩阵wecon,可是再运行下面命令却提示:
. spmat import wedg using wecon.txt
. spmat save wecon using wecon.spmat
spmat object wecon not found
r(498);
请问是哪里出了问题?谢谢!