Announcement

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

  • error obtaining scores for robust variance

    Dear all,

    I am teaching to students who are using STATA 17 and I have STATA 16 on my machine.

    Weirdly enough, when estimating a model using "mixed" and specifying

    mixed y x1 x2 x3 || id:, nocon res(ar6,t(t)) stddev robust

    I get correct results, while they get the error message "error obtaining scores for robust variance".

    Any ideas on what happened between STATA 16 and 17 that might affect this?

    Thank you!

  • #2
    I wonder if this discrepancy is somehow related to the specific data. You show only an abstract command, so I cannot try to replicate exactly what you did. When I try the same approach using the grunfeld.dta, on version 17, it runs just fine:

    Code:
    . webuse grunfeld
    
    . mixed mvalue kstock invest time || company:, nocon res(ar6, t(year)) stddev robust
    
    Obtaining starting values by EM ...
    
    Performing gradient-based optimization:
    Iteration 0:   log pseudolikelihood = -1579.5777  (not concave)
    Iteration 1:   log pseudolikelihood = -1507.9028  (not concave)
    Iteration 2:   log pseudolikelihood = -1438.5601  (not concave)
    Iteration 3:   log pseudolikelihood = -1426.4213  
    Iteration 4:   log pseudolikelihood = -1413.0009  
    Iteration 5:   log pseudolikelihood = -1409.7346  
    Iteration 6:   log pseudolikelihood = -1409.2966  
    Iteration 7:   log pseudolikelihood = -1409.2838  
    Iteration 8:   log pseudolikelihood = -1409.2838  
    
    Computing standard errors ...
    
    Mixed-effects regression                        Number of obs     =        200
    Group variable: company                         Number of groups  =         10
                                                    Obs per group:
                                                                  min =         20
                                                                  avg =       20.0
                                                                  max =         20
                                                    Wald chi2(3)      =     370.36
    Log pseudolikelihood = -1409.2838               Prob > chi2       =     0.0000
    
                                   (Std. err. adjusted for 10 clusters in company)
    ------------------------------------------------------------------------------
                 |               Robust
          mvalue | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
          kstock |  -.9089089    .624258    -1.46   0.145    -2.132432    .3146143
          invest |   3.838094   1.016067     3.78   0.000     1.846638    5.829549
            time |   11.79285   9.994212     1.18   0.238     -7.79544    31.38115
           _cons |   668.1245   251.9903     2.65   0.008     174.2325    1162.017
    ------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------
                                 |               Robust           
      Random-effects parameters  |   Estimate   std. err.     [95% conf. interval]
    -----------------------------+------------------------------------------------
    company:             (empty) |
    -----------------------------+------------------------------------------------
    Residual: AR(6)              |
                            phi1 |    .579824   .2024835      .1829636    .9766843
                            phi2 |  -.1020932   .0272441     -.1554906   -.0486958
                            phi3 |   .1150155   .0708875     -.0239215    .2539524
                            phi4 |   .3248284   .1283233      .0733195    .5763374
                            phi5 |  -.2723966   .0740986     -.4176271   -.1271662
                            phi6 |   .3360378   .1141125      .1123814    .5596942
                           sd(e) |   827.5843   228.0541      482.2253    1420.282
    ------------------------------------------------------------------------------
    
    
    
    . about
    
    Stata/MP 17.0 for Windows (64-bit x86-64)
    Revision 05 Oct 2021
    Copyright 1985-2021 StataCorp LLC
    
    Total physical memory:       32.00 GB
    Available physical memory:   16.68 GB
    
    Stata license: Single-user 4-core  perpetual
    Serial number: [Redacted]
      Licensed to: Clyde Schechter
                   Albert Einstein College of Medicine

    Comment

    Working...
    X