clear all
. use "C:\Users\DELL\Desktop\D.dta"
. spatwmat using "C:\Users\DELL\Desktop\W.dta",name(W) standardize
The following matrix has been created:
1. Imported non-binary weights matrix W (row-standardized)
Dimension: 9x9
. spcs2xt y x1 x2 x3 x4 x5 x6 x7,matrix(aaa) time(15)
****************************************************
*** Cross Section Weight Matrix (aaa)
*** Panel Weight Matrix (aaaxt)
*** Panel Weight Matrix File (aaaxt.dta)
****************************************************
C:\Users\DELL\Documents
. spatwmat using aaaxt,name(W)
Matrix is not square
. clear
. use "C:\Users\DELL\Desktop\D.dta"
. xtset id year
panel variable: id (strongly balanced)
time variable: year, 2005 to 2019
delta: 1 unit
. reg y x1 x2 x3 x4 x5 x6 x7
. spatdiag,weights(W)
Matrix W is 9x9, regression has been carried out on 135 obs.
To run -spatdiag- weights matrix dimension must equal N. of obs
朋友们,提示matrix不方应该怎么处理呀?是我扩大权重矩阵命令没用对吗?
(面板数据是9个截面15年的,矩阵W是9x9的,要怎样扩大成135X135呀?)


雷达卡






京公网安备 11010802022788号







