Announcement

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

  • Problem in using ivregress 2sls command in oaxaca

    Hi everyone,

    I'm getting errors when I run the following code:

    oaxaca y x1 x2...x10, by(caste) pooled model2(ivregress 2sls, addrhs((lninc=iv1 iv2)))

    where y = dependent var, x1, x2, ...,x10 are exogenous independent variables, lninc is endogenous independent var and iv1 and iv2 are the instruments.

    I am using Stata 15.1 and I got the following error message:

    option / not allowed
    r(198);

    end of do-file

    r(198);

    I will be glad, if anyone can help me to fix the problem in this command.

    Thanks in advance for your cooperation,
    S

  • #2
    My guess is that you do not show us everything that you typed or that is in your do-file. Therefore, it is difficult to see where your problem is.
    It could be that you tried to make your code more readable by including "///" somewhere at the end of a line, but you used only "/" or you copied your code to the Stata command window, where comments don't work.

    Comment


    • #3
      Thank you so much, Sven-Kristjan.

      Yes, I used "///" in my program but not "/". Following your suggestion, I removed those lines and run my code. It works well.

      Thanks a lot.
      S

      Comment

      Working...
      X