I am trying to create a spatially lagged X variable to run a SLX type model
Issue: I get a compatibility error message when trying to generate the WX variable
I have strongly balanced panel data with a width of 25. Consequently, my inverse distance matrix is a 25x25 matrix. So I don't quite understand why the matrices would be incompatible i.,e. W(25x25)*X(25x1).
Code:
spmat lag double wTemperatureLag10 ID2 TemperatureLag10
where ID2 is my 25x25 inverse distance matrix and TemperatureLag10 is the X variable that I want to turn into a spatial lag WX variable.
Output:
. spmat lag float wInfectionRateLag10 ID2 InfectionRate
*: 3200 conformability error
SPMAT_lag(): - function returned error
<istmt>: - function returned error
thank you for your response.
Related Posts with Compatability error while creating a spatial lagged explanatory variable
Statistical inferenceThe country is Japan, the period is 1972-2020, and the data is annual information. The current accou…
How to generate the Strong Parallel Trend Assumption presented in Callaway, Goodman-Bacon & Sant'Anna 2021I'm running a DID model with multiple timer periods and continuous treatment. I currently run the tr…
Generating new variables using macros and loopsHello, I am trying to generate new variables with the use of macros and having issues with the synta…
merging data with different time frequenciesHello, I have looked for guidance from other posts but could not solve this: I have two datasets- 'D…
Help with clock() functionDear all, I had a time variable in string format. I use clock() function to change it to Stata read…
Subscribe to:
Post Comments (Atom)
0 Response to Compatability error while creating a spatial lagged explanatory variable
Post a Comment