Announcement

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

  • IV variable option in Stata program syntax

    Hello

    I am trying to write a program to run a regression based on some criteria and I want to add the possibility of adding an instrumental variable. So I want my customized program "myreg" to work like this:
    Code:
    myreg Yvar X1var (X2var = Zvar)
    Where X1var and X2var are independent variables and X2var is instrumented with Zvar. My question is, in the "syntax" command, how should I introduce the option of adding the (X2var = Zvar) part?
Working...
X