Announcement

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

  • How to turn off scientific notation for estat ic/est stats to avoid identical AIC results?

    Hi,
    I'm in need of advice of how to turn off scientific notation for estat ic/est stats. I have changed the format for the regressions so that scientific notation is not used in those, but I haven't been able to do it for the subsequent commands.

    Likely because of the scientific notation, I get identical AIC results for multiple models. Or -- if someone has another idea of why I might get the same AIC results for different models, I'd be very grateful for any advice.

    My code looks something like this:
    xtreg y x1 x2 ..., , fe vce(cl var)
    est stats --OR-- est stats

    Best,
    Signe

  • #2
    Scientific notation is used to display either very large or very small numbers. This value will be stored in a matrix -r(S)- which you can retrieve.

    Code:
    webuse grunfeld, clear
    qui xtreg invest mvalue kstock i.time, fe
    est stats
    mat l r(S)
    di %17.9f r(S)[1, 5]
    Res.:

    Code:
    . est stats
    
    Akaike's information criterion and Bayesian information criterion
    
    -----------------------------------------------------------------------------
           Model |          N   ll(null)  ll(model)      df        AIC        BIC
    -------------+---------------------------------------------------------------
               . |        200  -1216.349  -1056.132      22   2156.264   2228.827
    -----------------------------------------------------------------------------
    Note: BIC uses N = number of observations. See [R] BIC note.
    
    .
    . mat l r(S)
    
    r(S)[1,6]
                N         ll0          ll          df         AIC         BIC
    .         200  -1216.3487  -1056.1322          22   2156.2645   2228.8275
    
    .
    . di %17.9f r(S)[1, 5]
       2156.264484287

    Comment


    • #3
      Big thanks, Andrew! This solution worked perfectly.

      Best,
      Signe

      Comment

      Working...
      X