
Participants of the webinar Spatial autoregressive models using Stata, which took place on March 7, 2018, asked StataCorp developers the following:
Question: | Are W matrices available at the county level for each state in the USA? |
---|---|
Answer: | You will see how to use commands in Stata to create W matrices from shapefiles. Search for "us census tiger" to locate those shape files. |
Question: | What is gs2sls? |
Answer: | The gs2sls option requests the "generalized spatial two-stage least-squares" estimator for the model parameters. |
Question: | What if I have more than one observation for each census area? For example, distance from school depending on immigrant resident rates? |
Answer: | Spatial datasets require only one x value for each spatial unit. |
Question: | I don't quite understand why Stata *requires* that the data be strongly balanced in order to create a spatial lag, given that researchers using global data will almost always have countries which did not even exist in previous years. Is there a way around this? To calculate a unique spatial lag for each year so that strongly balanced is not necessary? |
Answer: | Regarding unbalanced panel spatial data. The answer is complicated. See the [SP] spxtregress manual entry. |
Follow up: | Just to be sure I understand the main answer though (I have read through the manual on the Sp commands), there is no way to create a spatial lag with unbalanced data, right? This functionality doesn't exist. |
Answer: | Yes, functionally it requires balanced data. But the reason there is this requirement is because formulation of the estimator and W requires it. |
Question: | Shouldn't the denominator in the indirect impact be 253 and not 254? |
Answer: | The indirect impact is calculated for each spatial unit, so the average is calculated across all spatial units, 254. |
Question: | Will this work with point shapefiles? |
Answer: | Yes, it works with point shapefiles. But obviously it cannot compute a contiguity matrix because there's no border info. Other weighting matrices can be computed with point data, such as inverse distance-weighting matrices. |
Question: | Can spxtregress handle time-varying spatial matrices? I do not use geographical spatial matrices that tend to be constant over time. I have non-geographic spatial interdependence that varies over time. |
Answer: | The estimators implemented in spxtregress cannot handle time-varying spatial matrices. |
Follow up: | When will Stata support time-varying spatial matrices? |
Answer: | I am working on a grant for spatial econometric methods. Time-varying matrices might fit into that project. I will look into it. I cannot make any promises about when that research might make it into Stata. |
Question: | Can you provide guidance on how to apply these methods to social network data? I imagine that this would be as simple as treating an adjacency matrix as a contiguity matrix, at least where ties are coded 0/1. But how could one get network data into a format that spregress could handle? |
Answer: | For social networks, each node is a spatial unit. The issue is the creation of W, which you understand from your question. See the [SP] spmatrix manual entry. |
Follow up: | Sorry, any place I should start in the [SP] spmatrix manual entry that would be a good place to begin reading? At first glance it seems like there are a lot of different places I could start. |
Answer: | Skim all the [SP] spmatrix manual entries. Also skim through the intros at the beginning of the [SP] manual. |
Question: | Can we fit a log-log model, and what will be the interpretation of the sp-lag coefficient? |
Answer: | spregress does not have the information needed to make predictions about the not logged dependent variable. |
Question: | Does Stata have similar commands to estimate discrete response models. Or does Sp handle this too? |
Answer: | There is no theory for a feasible SAR probit or SAR logit. |
Follow up: | I see some publications with SAR probit online: Use and interpretation of spatial autoregressive probit models. |
Answer: | Some people use linear probablity models with binary outcome and the SAR model. Kelly Pace at LSU was working on a probit SAR. His model could not handle large datasets last time I checked. |
Question: | Is this a new feature for Stata 15? |
Answer: | Yes, the spatial autoregressive models are new to Stata 15. |
Question: | What about multiple y values for each spatial unit? |
Answer: | You would have to see if formulating your analysis as panel data and using spxtregress makes sense. |
If you have additional questions about the webinar or about spatial autoregressive models using Stata, please contact our technical services department.