clear all
set more off
ssc install spwmatrix
ssc install spm
net install spm, from(http://www.econometrics.it/stata)
cd "... "
*First Spatial Weight; Neigbours weight
insheet using "....\wm1_btra_SDM2_third.csv", clear
save "wm1_btra_SDM2_third.dta"
gen id = _n
order id, first
rename v(#) m(#)
rename v(##) m(##)
spmat dta W m*, normalize(row)
*Second spatial weight: Non neighbours weight
insheet using "\wm2_btra_SDM2_third.csv", clear
save "wm2_btra_SDM2_third.dta"
gen id = _n
order id, first
rename v(#) m(#)
rename v(##) m(##)
spmat dta D m*, normalize(row)
*Dataset
import delimited "..\SPATIAL_FINAL_sovereign_stata.csv", clear
generate monthss = date(months,"MDY")
format %tdNN/DD/CCYY monthss
use SPATIAL_FINAL_sovereign_stata.dta, clear
save "SPATIAL_FINAL_sovereign_stata.dta", replace
global id id
global t monthss
global ylist cdsxx
global xlist cab_gdp ext_debt gdp_gr inf_rate reser vix
* Set data as panel data
*sort $id $t
xtset $id $t
spm cdsxx cab_gdp ext_debt gdp_gr inf_rate reser, model(durbin) sarwmat(W) sarw2mat(D)
estat ic
Error
*: 3200 conformability error
<istmt>: - function returned error
r(3200);
0 Response to 3200 conformability error using spm package
Post a Comment