Announcement

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

  • HPC Test, PPMLvs Heckman

    Dear all,

    I intend to perform a HPC test to compare between Heckman and PPML model. However, I am unsure about whether or not I am using the right set of codes. I have read the following paper on how to perform the test but still finds it a bit difficult to understand.

    Santos Silva, J.M.C., Tenreyro, S., and Windmeijer, F. (2015), Testing Competing Models for Non-Negative Data with Many Zeros, Journal of Econometric Methods, 4(1), pp. 29-46.


    Here are my codes:

    Code:
    *PPML 
    poisson DV IV
    predict f_one, n
    
    
    *Heckman
    heckman DV IV, select(dy = IV) twostep
    predict double fito, xb
    predict double xg, xbsel
    gen double fith=exp(fito+0.5*e(sigma)^2+log(normal(xg+ e(rho)*e(sigma))))
    
    
    *HPC Test
    hpc DV IV, a(f_one) b(fith)
    Note: DV represents dependent variable and IV represent a set of explanatory variables.

    It would be helpful if someone could identify the mistake in the above codes.

    Looking forward to your guidance.

    Best regards,
    Shazmeen Maroof.


  • #2
    Dear Shazmeen Maroof,

    I did not check the expressions, but that is the idea :-)

    Best wishes,

    Joao

    Comment


    • #3
      Dear Joao,

      Many thanks for directing me here.

      Does that mean my only mistake in the following thread was the way I generated the fitted values?

      https://www.statalist.org/forums/for...model-and-ppml

      Best regards,
      Imran Khan.

      Comment


      • #4
        Many thanks for confirming this.

        I am wondering should I post another related question as a new thread or is it okay posting here? This time I want to compare a Tobit model with 2-part model and struggling to write the code for HPC test in Stata. The confusion is particularly related to writing the second part of the test where fitted values for the conditional expectations of the two models need to be generated. In case of 2-part especially.

        Code:
        gen dy= DV>0
        
        *Tobit Model
        tobit DV IV , ll(0)
        
        *2-Part Model
        probit dy IV,  nolog
        estimates store probit
        regress DV IV if dy==1
        estimates store part2

        Your help will be appreciated as I couldn’t find the HPC test code for the two models.


        Best regards,
        Shazmeen Maroof.




        Comment


        • #5
          Dear Shazmeen Maroof

          I belive the expression you need are given in the paper you cited in #1.

          Best wishes,

          Joao

          Comment


          • #6
            Dear all,

            A quick related related question,
            I am running an HPC test to compare PPML Vs HECKMAN. My HECKMAN specification has the dependent variable in "log", while my PPML specification is in "levels" (quantity traded between o and d in Kg).

            What dependent variable should be used in the HPC equation? logged or in levels?

            Thank you.
            Best regards.

            Comment


            • #7
              Dear Malek Hammami,

              The dependent variables should be in levels. Many sure you use the predictions in levels for both models; the expressions are in the paper.

              Best wishes,

              Joao

              Comment

              Working...
              X