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
moving average/tsgenHi All, I have a monthly panel data for which I want to get the average of x variable from the last…
How to interpret coefficient of SMB for small and big dependent portfoliosI have six portfolios based on size-bm ratio following FF (1993) methodology these are SL, SN, SH, B…
Using lagged instrumental variable for lagged endogeneous variableDear Statalist members, I am trying to use IV model with panel data (xtivreg) along with fixed effe…
Using lagged instrumental variables for lagged endogenous variablesDear Statalist members, I am trying to use IV model with panel data (xtivreg) along with fixed effe…
Stata and Mata give different results for OLSI am confused why Stata OLS and Mata would give me different results, rather one of them is incorrec…
Subscribe to:
Post Comments (Atom)
0 Response to Compatability error while creating a spatial lagged explanatory variable
Post a Comment