Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • "Equation not identified" Error in xpoivregress with Parentheses in Control Variables

    Hi everyone,

    I’m analyzing the relationship between protests (endogenous variable) and a set of weather variables (instruments) using the xpoivregress command. I’m encountering an issue with how control variables are treated, which leads to an "equation not identified" error.

    Here’s the base command that executes without error, though the results are not ideal:
    xpoivregress lead_contr_accmu_nor (event_nor = c.(wvar1-wvar17)##c.(wvar1-wvar17) c.(wee1-wee17)##c.(wee1-wee17)), control(i.qofd i.place c.gdp `gdp_vars') vce(cl place) rseed(1) verbose

    Click image for larger version

Name:	result1.png
Views:	1
Size:	27.9 KB
ID:	1769388


    When I add parentheses around i.qofd and i.place to explicitly specify their interaction, the model fails after the first fold during the "estimating lasso for event_nor using plugin" step, returning the following error:
    xpoivregress lead_contr_accmu_nor (event_nor = c.(wvar1-wvar17)##c.(wvar1-wvar17) c.(wee1-wee17)##c.(wee1-wee17)), control((i.qofd i.place) c.gdp `gdp_vars') vce(cl place) rseed(1) verbose

    “equation not identified
    Must have at least as many selected instruments not in the regression as there are instrumented variables.
    r(481);



    What I understand so far is that adding parentheses around i.qofd and i.place seems to change how these controls are treated. Specifically, it likely generates interaction terms between qofd and place. Without parentheses, the nonzero coefficients start at 35, whereas with parentheses, they start at 355. This difference suggests significant changes in the variable selection process.

    Here are the questions I’d like to address:
    How does adding parentheses change the way xpoivregress treats control variables? How might this affect the variable selection process?
    How could the selection of instrumental variables differ between the two specifications: control(i.qofd i.place ...) vs. control((i.qofd i.place) ...)?
    What steps can I take to address the "equation not identified" error?

    *Note: The approach followed the paper “AI-tocracy” (link: https://academic.oup.com/qje/article/138/3/1349/7076890), where the authors included parentheses in their xpoivregress command.

    Thank you for taking the time to read this. I truly appreciate any insights or suggestions you might have to help resolve this issue!
Working...
X