Hello everyone,
I am trying to run a model with spatial lags of the dependent variable using spxtregress in Stata 17. I would like to create a neighbor contiguity matrix.
I have two datasets. For the first, I have the variables of coordinates like; _ID, _CY and _CX with observations of 54 African countries. The second, I have my panel data with 864 observations from 2003 to 2018.
My code used is;
merge m:1 country using “shp_59_country2.dta”
The results are 864 observations matched.
But when I use this code; “spmatrix create contiguity W"
Stata said “Some observations in master dataset are not in coordinates dataset” r(498);
Could somebody help me with this problem?
What have I been doing wrong?
Thank you.
I am trying to run a model with spatial lags of the dependent variable using spxtregress in Stata 17. I would like to create a neighbor contiguity matrix.
I have two datasets. For the first, I have the variables of coordinates like; _ID, _CY and _CX with observations of 54 African countries. The second, I have my panel data with 864 observations from 2003 to 2018.
My code used is;
merge m:1 country using “shp_59_country2.dta”
The results are 864 observations matched.
But when I use this code; “spmatrix create contiguity W"
Stata said “Some observations in master dataset are not in coordinates dataset” r(498);
Could somebody help me with this problem?
What have I been doing wrong?
Thank you.
Comment