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);
Related Posts with 3200 conformability error using spm package
Continuous vs binary independent variable in logistic regressionI'm new to statistics and coding so apologize if this is a dumb question but here it goes: I'm runni…
Testing coefficientsDear statalists, I am running 12 different regressions of political risk factors on the amount of M…
Workaround for suest restriction on brr [r(322)]?Hi Everyone, I have survey data that uses brr for its error estimation. I would like to compare the…
How to create a varaible based on each value of existing variable in did_imputation?I have the Syntax of did_imputation is as below Array I am wondering how to create the variable Ei.…
How to create a new binary variable (0-1) based on some conditions in Stata?input id t1 t2 t3 1 1.5 1.4 1.6 2 1.5 . 1.9 3 . 2.0 1.6 4 . . 2.2 5 1.9 2.1 2 6 1.8 2.0 1.9 7 . . . …
Subscribe to:
Post Comments (Atom)
0 Response to 3200 conformability error using spm package
Post a Comment