Dear Statalisters,
I'm using Stata 17.0.
I’m facing the issue of being willing to put together three things that, it seems to me, can’t be performed simultaneously in Stata. In fact, I would like to:
Solution A isn’t satisfactory, since including spatial lags means to control for space dependence too heavily: it enormously affects the estimated effect of predictors changing in time but not in space, even reversing their sign (by keeping statistical significance).
I’m using solution B at the moment (by using the “spxtregress” command with random effects, spatially autoregressive errors, fixed effects for seasonality and including the time-lagged outcome among predictors).
My questions are:
Spinelli, D. 2022. Fitting spatial autoregressive logit and probit models using Stata: The spatbinary command. Stata Journal 22: 293–318.
Gu A., Yoo H.I., 2019. "VCEMWAY: Stata module to adjust a Stata command's standard errors for multi-way clustering," Statistical Software Components S458662, Boston College Department of Economics, revised 14 Jun 2022.
I'm using Stata 17.0.
I’m facing the issue of being willing to put together three things that, it seems to me, can’t be performed simultaneously in Stata. In fact, I would like to:
- use a spatial autoregressive (SAR) model (to account for the fact that the outcome of each area may depend from unobserved factors of the neighbouring areas);
- use panel data (my dataset is made by observations that are at the area*time level: in particular, my panel is balanced);
- use a binary outcome (whether in each area*time combination there has been at least one contact with health services).
- A) Generate a spatial lag of the outcome (through "spgenerate") and use it (or better saying: a transformation of it in accordance with the link function used for the outcome) as a predictor (using the “vcemway” command to account for both time- and space- clustering of errors);
- B) Change the outcome, making it continuous (contact rate).
Solution A isn’t satisfactory, since including spatial lags means to control for space dependence too heavily: it enormously affects the estimated effect of predictors changing in time but not in space, even reversing their sign (by keeping statistical significance).
I’m using solution B at the moment (by using the “spxtregress” command with random effects, spatially autoregressive errors, fixed effects for seasonality and including the time-lagged outcome among predictors).
My questions are:
- Is there any problem in using an outcome that is made in 90% of cases by zeros with "spxtregress"? Unfortunately it seems to me there’s no way to introduce robust standard errors.
- Alternatively, is there a way to fulfill points 1, 2 and 3 above simultaneously, thus to take into account the space-time panel nature of the data by, at the same time, using a binary outcome?
Spinelli, D. 2022. Fitting spatial autoregressive logit and probit models using Stata: The spatbinary command. Stata Journal 22: 293–318.
Gu A., Yoo H.I., 2019. "VCEMWAY: Stata module to adjust a Stata command's standard errors for multi-way clustering," Statistical Software Components S458662, Boston College Department of Economics, revised 14 Jun 2022.
