Announcement

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

  • HOW to obtain the log-likelihood values in a pooled OLS and FE estimations (panel data) ????

    Hello everybody!

    My issue is that in some papers using panel data, I noticed that in the estimate results inherent a pooled OLS regression, they report the value of the log-likelihood.

    I was wondering how this is possible in Stata, since OLS and ML are two separate estimators (leaving apart the normality assumption of the residuals to make them coincide).

    For instance, to be more clear, see this paper (pag. 16, Table 1):

    http://ageconsearch.umn.edu/bitstrea...ing%20Zhao.pdf
    How were the log likelihood values obtained in the panel estimates of Table 1 through the implementation of POLS, and FE estimators?..which is the command to obtain them?


    ps.: a second (smaller) clarification: I suppose that sigma squared in Table 1 refers to the Root MSE, right?

    Thank you very much!!

    Kodi



  • #2
    Kodi:
    you may want to take a look at -Example 5: Random-effects model fit using ML- under -xtreg- entry in Stata .pdf manual.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi Carlo,

      thank you for your reply

      Yes, I know about the xtreg ..., mle command, however, that command solely refers to the random effect..what about the fixed effect?

      And, above all, what about the pooled OLS regression? ("reg", not "xtreg"). I didn't find anything on this..

      Comment


      • #4
        Kodi:
        I'm not aware of MLE for -xtreg, fe-.
        As far as you second question is concerned, you may want to take a look at the following link http://stats.stackexchange.com/quest...ing-mle-vs-ols
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          I'm not sure what "pooled OLS regression" means, but if you're going
          Code:
          regress response . . . i.id
          , then you can get the corresponding log-likelihood by going
          Code:
          glm response . . . i.id
          But if you want the log-likelihood with a fixed-effects panel model fitted with xtreg . . ., fe (which is uses ordinary least-squares estimation as far as I am aware), then use estat ic afterwards.

          Edited to add: you can also use estat ic after regress, too.

          .ÿversionÿ14.0

          .ÿ
          .ÿclearÿ*

          .ÿsetÿmoreÿoff

          .ÿ
          .ÿsysuseÿbplong
          (fictionalÿblood-pressureÿdata)

          .ÿ
          .ÿxtregÿbpÿi.when,ÿi(patient)ÿfe

          Fixed-effectsÿ(within)ÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿ240
          Groupÿvariable:ÿpatientÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿgroupsÿÿ=ÿÿÿÿÿÿÿÿ120

          R-sq:ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿObsÿperÿgroup:
          ÿÿÿÿÿwithinÿÿ=ÿ0.0856ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿÿÿÿÿ2
          ÿÿÿÿÿbetweenÿ=ÿÿÿÿÿÿ.ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿÿÿ2.0
          ÿÿÿÿÿoverallÿ=ÿ0.0380ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿÿÿÿÿ2

          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿF(1,119)ÿÿÿÿÿÿÿÿÿÿ=ÿÿÿÿÿÿ11.14
          corr(u_i,ÿXb)ÿÿ=ÿ0.0000ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿFÿÿÿÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.0011

          ------------------------------------------------------------------------------
          ÿÿÿÿÿÿÿÿÿÿbpÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿtÿÿÿÿP>|t|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
          -------------+----------------------------------------------------------------
          ÿÿÿÿÿÿÿÿwhenÿ|
          ÿÿÿÿÿÿAfterÿÿ|ÿÿ-5.091667ÿÿÿ1.525736ÿÿÿÿ-3.34ÿÿÿ0.001ÿÿÿÿ-8.112776ÿÿÿ-2.070557
          ÿÿÿÿÿÿÿ_consÿ|ÿÿÿÿÿ156.45ÿÿÿ1.078858ÿÿÿ145.01ÿÿÿ0.000ÿÿÿÿÿ154.3138ÿÿÿÿ158.5862
          -------------+----------------------------------------------------------------
          ÿÿÿÿÿsigma_uÿ|ÿÿ9.7739785
          ÿÿÿÿÿsigma_eÿ|ÿÿ11.818301
          ÿÿÿÿÿÿÿÿÿrhoÿ|ÿÿ.40616276ÿÿÿ(fractionÿofÿvarianceÿdueÿtoÿu_i)
          ------------------------------------------------------------------------------
          Fÿtestÿthatÿallÿu_i=0:ÿF(119,ÿ119)ÿ=ÿ1.37ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿFÿ=ÿ0.0444

          .ÿestatÿic

          Akaike'sÿinformationÿcriterionÿandÿBayesianÿinformationÿcriterion

          -----------------------------------------------------------------------------
          ÿÿÿÿÿÿÿModelÿ|ÿÿÿÿÿÿÿÿObsÿÿll(null)ÿÿll(model)ÿÿÿÿÿÿdfÿÿÿÿÿÿÿÿÿAICÿÿÿÿÿÿÿÿBIC
          -------------+---------------------------------------------------------------
          ÿÿÿÿÿÿÿÿÿÿÿ.ÿ|ÿÿÿÿÿÿÿÿ240ÿ-859.8148ÿÿ-849.0792ÿÿÿÿÿÿÿ2ÿÿÿÿ1702.158ÿÿÿÿ1709.12
          -----------------------------------------------------------------------------
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNote:ÿN=ObsÿusedÿinÿcalculatingÿBIC;ÿseeÿ[R]ÿBICÿnote.

          .ÿ
          .ÿexit

          endÿofÿdo-file


          .

          Last edited by Joseph Coveney; 24 Jul 2015, 04:56.

          Comment


          • #6
            Thank you all.

            And thank you Joseph, you are a king!

            Comment

            Working...
            X