Announcement

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

  • Logit, probit and linear probability model

    I'm trying to draw comparison across Logit, Probit and Linear Probability models with reference to the paper by Duflo et. al(2011). There's a Stata command that helps one to create such as a table, the command being :
    *Table for comparing models
    estimates table blogit blogitr bprobit bprobitr bols bolsr, t stats( N 11) b(%7.3f) stfmt(%8.2f)

    Can someone explain how to choose N? Also, what is "b(%7.3f) stfmt(%8.2f)"

  • #2
    I think you have misread the help file for estimates table. There is no -stats(N 11)- It is -stats(N ll)- with lower case letter L's, not digit 1's. The ll stands for log likelihood. It is not a choice for the value of N; it is a separate statistic. The command requests that the sample size (N) and the log likelihood (ll) be printed as part of the output.

    -b(%7.3f)- specifies that the regression coefficients (b) be printed in %7.3f format, that is, in a field of at least 7 characters, and three digits after the decimal point. -stfmt(%8.2f)- tells Stata to print the scalar statistics (i.e. N and log likelihood) in a field of at least 8 characters, with 2 digits after the decimal point.

    Do read -help format- for a full explanation of Stata's display format, that allow you to control the appearance of your output.

    Comment


    • #3
      Thank you Clyde for your reply. The help format is useful. I have been able to generate the output. However, the outputs for OLS estimation comes in a separate table(as in the attachment below)...i want all the models in one table. Why does this happen? What should I do?
      Attached Files

      Comment


      • #4
        Well, the output you show (which, by the way, is barely readable on my computer--the Forum really discourages screenshots for this reason: show output by copy/pasting it between code delimiters to assure readability) has no output for ols and olsr at all. I don't really use -estimates table- that often, so I'm not familiar with its details. My best guess is that the problem is because you specified the log-likelihood ratio in the -stats()- option. Ordinary least squares regression does not generate that statistic because it is not estimated by maximum likelihood. So I think -estimates table- couldn't fit it in with the others. If you don't really need the log-likelihood, I would try dropping the ll from your -stats()- option and see if that doesn't fix the problem.

        Comment


        • #5
          Thank you Clyde for your reply.There is output for ols and olsr but it comes separately (maintaining the same column for ols, olsr) below the table for logit, logitr, probit, probitr, keeping the space besides the table blank. I have dropped the ll assumption but I have the same output. I got the -estimates table- codes from the "microecnometrics using stata" book by Cameron and Trivedi. The author makes use of the same codes and his output have all these three models( ols, logit, probit) in the same table, side by side.

          Comment


          • #6
            Ah, yes. The problem is that -regress- does not assign the same name to the equation it estimates that logit and probit do. So you have to tell Stata to treat them as all the same equation. You can do that with the -equations()- option of -estimates table-

            Code:
            estimates table blogit blogitr bprobit bprobitr bols bolsr, stats(N) bfmt(%7.3f) stfmt(%1.0f) equations(1)
            Read the help file for -estimates table-, and go to the explanation there of the -equations()- option for more details.

            Comment


            • #7
              Thank you Clyde for this useful discussion. The code above worked this time!

              Comment

              Working...
              X