Announcement

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

  • nwest poisson doesn't work: get the error message "name conflict"

    Hi, I have a panel data and I want to run a Poisson regression with Newey-West standard errors. My code is:

    sort group year
    xi i.year i.group

    nwest poisson y x _Iyear* _Igroup*, force lag(3)

    I get the error message:

    name conflict
    r(507);


    When I try different specifications (probit, regress) everything works. What is the problem?

  • #2
    Muly:
    eyeballing your code (2nd line) I've found something unable to produce any results (-xi- instead of -xi.-), as you can see from the following example:
    Code:
    . xi nwest regress ln_wage i.race
    i.race            _Irace_1-3          (naturally coded; _Irace_1 omitted)
    
    . xi: nwest regress ln_wage i.race
    i.race            _Irace_1-3          (naturally coded; _Irace_1 omitted)
    
    Regression with Newey-West standard errors          Number of obs  =     28534
    maximum lag : 0                                     F(  2, 28531)  =    276.49
                                                        Prob > F       =    0.0000
    
    ------------------------------------------------------------------------------
                 |               Robust
         ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
        _Irace_2 |  -.1427862   .0061721   -23.13   0.000    -.1548837   -.1306887
        _Irace_3 |    .080671   .0291848     2.76   0.006     .0234674    .1378747
           _cons |   1.714338   .0033551   510.97   0.000     1.707762    1.720914
    ------------------------------------------------------------------------------
    I can't say whether that is the cause of the error you complain about, though.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      I used your syntax and got the same error message. Again, the problem is only with newst poisson. It works when I run nwest regress.

      Comment


      • #4
        Muly:
        yes, you're right and my intuition was wrong.
        This is what you get when you type -help r(507)-:
        error . . . . . . . . . . . . . . . . . . . . . . . . Return code 507
        name conflict;
        You have issued a matrix post command, and the variance-
        covariance matrix of the estimators does not have the same row
        and column names, or if it does, those names are not the same
        as for the coefficient vector.
        Who is the culprit, I still do not know.

        If nobody chimes in with a solution, I woud suggest you to email the author of -nwest- directly.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Thanks, Carlo!

          Anyone else?

          Comment

          Working...
          X