Announcement

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

  • Test two models for best fit

    Hi Stata

    I want to test two models against each other to see if one's fit is significantly better than the alternative.
    As one is not nested in the other I need an alternative to the LR-test.

    The two regressions are in log- and quadradic form respectively.
    tea = ln(gdp_cap)
    tea= gdp_cap^2

    Thanks for any help,

    Laurence

  • #2
    Maybe something like this.
    Code:
    version 15.1
    
    clear *
    
    set seed `=strreverse("1499483")'
    quietly set obs 25
    
    foreach var of newlist tea gdp_cap {
        generate double `var' = runiform()
    }
    
    // tea = ln(gdp_cap)
    generate double ln_gc = ln(gdp_cap)
    regress tea c.ln_gc
    estimates store LN
    
    // tea= gdp_cap^2
    generate double gc2 = gdp_cap * gdp_cap
    regress tea c.gc2
    estimates store SQ
    
    estimates stats LN SQ
    
    exit
    Or maybe you can just compare the explained variance (R2) or the mean squared error by inspection.

    Comment


    • #3
      Dear Laurence Vedelsdal,

      You can do a simple test for non-nested hypotheses using the artificial nesting approach. That is, you can estimate

      tea = a*ln(gdp_cap)+b*gdp_cap^2

      and test the significance of a and b. If, for example, you accept that a = 0 but reject b = 0, the quadratic model is preferred. The advantage of this approach is that it can reject both models if neither is adequate.

      Best wishes,

      Joao

      Comment


      • #4
        Thank you both for your advice - it is much appreciated.

        As it is a component in my thesis, I am curious if you have any academic papers exlpaining the metholdology that I can cite?

        Best,
        Laurence

        Comment


        • #5
          Sure, search for the Davidson and MacKinnon 1981 Econometrica paper.

          Joao

          Comment


          • #6
            Thank you for the advice and the reference.

            Laurence

            Comment

            Working...
            X