Announcement

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

  • reg3: constant still estimated despite noconstant option

    Hi,

    I would like to compare the results of three IV regressions estimated by xtivreg2 with those of a reg3 estimation.
    I first estimated the 3 estimations separately using xtivreg2.

    Subsequently I estimated the model with reg3. To estimate a fixed effects model with reg3 I transformed the data using xtdata,fe.
    When estimating the model using reg3 I also added the option nocons. However, regardless of whether the nocons option is incldued or not a constant term is always estimated.
    Is this a bug or did I do something wrong?

    The code:

    xtivreg2 y1 x1 x2 (x3=z1), fe cluster(id)
    xtivreg2 y2 x1 x2 (x3=z1), fe cluster(id)
    xtivreg2 y3 x1 x2 (x3=z1), fe cluster(id)

    xtdata y1 y2 y3 x1 x2 x3 z1, fe
    bootstrap: reg3 (eq1: y1 x1 x2 x3) (eq2: y2 x1 x2 x3) (eq3: y3 x1 x2 x3), endog(x3) exog(z1) nocons

    Many thanks,
    Bobby



  • #2
    from the look of the help file for -reg3-, nocons is an option to each equation, not an option overall; so, try moving ", nocons" inside the parens for each equation statement

    Comment


    • #3
      Originally posted by Rich Goldstein View Post
      from the look of the help file for -reg3-, nocons is an option to each equation, not an option overall; so, try moving ", nocons" inside the parens for each equation statement
      Thanks for the suggestion but I already tried this before and received error message "variable noconstant not found"

      Comment


      • #4
        Did you include the comma as Rich suggested, so Stata understands it is an option, not a variable?

        Comment


        • #5
          Oh no I overlooked the comma. Now it works, thanks very much!

          Comment

          Working...
          X