Announcement

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

  • looking for user command -abic- by Hilbe

    The late Jospeh Hilbe refers in his book cited below to "a user command I wrote called abic, which provides two types each of AIC (Akaike Information Criterion) and BIC (Bayesian Information Criterion) fit statistics" (pp. 43-44). However, -findit abic- and -search abic- don't locate it. Sadly, Hilbe's personal website no longer has gone down.

    Is there a similar command? He mentions that "Akaike later developed what he considered to be a superior statistic, called the ABIC, but it has not gained acceptance by the greater research community" (p. 116). Presumably, his -abic- command included this statistic.

    Hilbe, Joseph M. (2014) Modeling Count Data. Cambridge University Press.

  • #2
    Perhaps you can find a copy of Hilbe's personal website on the Internet Archive.

    https://archive.org/web/

    which unfortunately is offline as I write this due to a power disruption.

    Comment


    • #3
      Originally posted by Doug Hess View Post
      The late Jospeh Hilbe refers in his book cited below to "a user command I wrote called abic, which provides two types each of AIC (Akaike Information Criterion) and BIC (Bayesian Information Criterion) fit statistics" (pp. 43-44). However, -findit abic- and -search abic- don't locate it. Sadly, Hilbe's personal website no longer has gone down.

      Is there a similar command? He mentions that "Akaike later developed what he considered to be a superior statistic, called the ABIC, but it has not gained acceptance by the greater research community" (p. 116). Presumably, his -abic- command included this statistic.

      Hilbe, Joseph M. (2014) Modeling Count Data. Cambridge University Press.
      I think this is what you are looking for. The attached file is an ado file written by Jospeh Hilbe.
      Attached Files

      Comment


      • #4
        Originally posted by Dung Le View Post

        I think this is what you are looking for. The attached file is an ado file written by Jospeh Hilbe.
        Thanks! Do you have the help file (.hlp)?

        Comment


        • #5
          Originally posted by Doug Hess View Post

          Thanks! Do you have the help file (.hlp)?
          Sorry, I don't.

          Comment


          • #6
            The absence of a help file doesn't seem fatal here. Here's the code

            Code:
            * Program to calculate two types of AIC and BIC tests
            * Joseph M. Hilbe, hilbe(at)asu.edu
            program define abic
                version 9.1
                quietly {
                    local  ll   = e(ll)
                    if `ll' == . {            /* In case deviance-based */
                        local ll = -.5*e(dev)
                    }
                    else
                
                    qui {
            
                       tempvar  aicn aic bic abic
                       tempname b
                   local nobs  = e(N)
                   matrix `b'  = e(b)
                   local  p    = colsof(`b')
                   local  nc   = 0        
                       local  k    = e(k)
                       local npred = e(df_m)
                    
                       gen `aicn'  = (-2*`ll' + 2*`k')/`nobs'
                       gen `aic'   = (-2*`ll' + 2*`k')
                       gen `bic'   = -2*(`ll'-`k'*ln(`k'))/`nobs'
                       gen `abic' = -2*`ll'+`k'*ln(`nobs')
                    }
            }
            
            di as txt _col(1) "AIC Statistic   =  " as res %9.0g `aicn' _col(40) in gr "AIC*n      = " in ye `aic'
            di as txt _col(1) "BIC Statistic   =  " as res %9.0g `bic'  _col(40) in gr "BIC(Stata) = " in ye `abic'
            
            end
            The ABIC statistic requires e(N) e(k) and e(ll) to be a visible saved result. That being so you could just go


            Code:
            display -2 * e(ll) + e(k) * ln(e(N)) 
            with number of decimal places and so forth and your discretion.

            Code for the alternative case in which the calculation starts with a deviance can be written as another one-liner.


            The code displays some programming quirks such as using entire variables to hold constants and not saving any results. In addition, some quantities are calculated but never used. It could be a Stata programming exercise to trim it down to use scalars and leave behind some saved results.

            Note: As flagged, Joe is no longer with us to document or explain his code. See e.g. https://www.stata-journal.com/articl...article=gn0073

            These criteria are wonderful. For every criterion that some group flags as an objective single-value figure of merit there is a chorus of criticism and complaint that it leads to mistaken decisions.

            Naturally, if you want any result to stick around in a session, put it somewhere safe, say a scalar.
            Last edited by Nick Cox; 16 Jan 2022, 07:01.

            Comment

            Working...
            X