Announcement

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

  • Quadrature() and numerical integration in Mata

    Hi,

    I am estimating a Poisson log-normal count data model with maximum likelihood and I need to do a numerical one-dimension integration within optimize() in Mata.

    So far, I used the quadrature on sparse grid:

    http://www.sparse-grids.de/


    But the results are partially inconsistent, i. e. different initial values of the parameters make converge the log-likelihood function at different points and thus different estimates (although close).

    I think that this depends on the fact that for very few observations and some nodes the llf goes to infinite , i. e. it would take larger values than the range of exp() 8e+307, and this affects the optimisation procedure at each iteration.

    The Quadrature() class seems particularly suitable for this problem, but I am afraid is available only for Stata 16 (I have Stata 15):

    https://www.stata.com/manuals/m-5qua...-5Quadrature()

    and thus I was wondering what would be the best way to proceed.

    Any help would be greatly appreciated.

    Simone

  • #2
    You could look at maximum simulated likelihood https://www.stata-journal.com/sj6-2.html
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Hi Maarten,

      Thanks for your suggestion.

      For the record, I tried with integrate_aq():

      INTEGRATE_AQ: Stata module to do adaptive quadrature for integrals by Adrian Mander (2018):

      https://econpapers.repec.org/softwar...de/s458502.htm

      and I got what I was looking for: the log-likelihood function converges at the very same optimum for different initial values of the parameters. Also, without adaptive quadrature the results were quite sensible to the number of quadrature points, but this not happen with integrate_aq().

      Simone

      Comment

      Working...
      X