Announcement

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

  • Outreg2 in Probit model

    Hi everyone,

    I am using outerg2 to publish the results of a Probit regression in a word document. However, in the table I get only the coefficients. How can I include also "robust standard error", "z", "p-value", "c.i.", "pseudoR2", "logpseudolikelihood", etc?

    I understand I have to use the command addstat, but I don't get what values I should put in brackets.

    Thanks a lot for any info!

  • #2
    If you go into "help probit" and go down to "Stored Results" it will give you the list of everything Stata stores and how to refer to them. By defult, outreg2 (SSC) should export the standard errors or p-value for the variables in the regression.

    Code:
    Stored results
    
        probit stores the following in e():
    
        Scalars        
          e(N)                number of observations
          e(N_cds)            number of completely determined successes
          e(N_cdf)            number of completely determined failures
          e(k)                number of parameters
          e(k_eq)             number of equations in e(b)
          e(k_eq_model)       number of equations in overall model test
          e(k_dv)             number of dependent variables
          e(df_m)             model degrees of freedom
          e(r2_p)             pseudo-R-squared
          e(ll)               log likelihood
          e(ll_0)             log likelihood, constant-only model
          e(N_clust)          number of clusters
          e(chi2)             chi-squared
          e(p)                p-value for model test
          e(rank)             rank of e(V)
          e(ic)               number of iterations
          e(rc)               return code
          e(converged)        1 if converged, 0 otherwise
    
        Macros        
          e(cmd)              probit
          e(cmdline)          command as typed
          e(depvar)           name of dependent variable
          e(wtype)            weight type
          e(wexp)             weight expression
          e(title)            title in estimation output
          e(clustvar)         name of cluster variable
          e(offset)           linear offset variable
          e(chi2type)         Wald or LR; type of model chi-squared test
          e(vce)              vcetype specified in vce()
          e(vcetype)          title used to label Std. Err.
          e(opt)              type of optimization
          e(which)            max or min; whether optimizer is to perform maximization or minimization
          e(ml_method)        type of ml method
          e(user)             name of likelihood-evaluator program
          e(technique)        maximization technique
          e(properties)       b V
          e(estat_cmd)        program used to implement estat
          e(predict)          program used to implement predict
          e(marginsok)        predictions allowed by margins
          e(marginsnotok)     predictions disallowed by margins
          e(asbalanced)       factor variables fvset as asbalanced
          e(asobserved)       factor variables fvset as asobserved
    
        Matrices      
          e(b)                coefficient vector
          e(Cns)              constraints matrix
          e(ilog)             iteration log (up to 20 iterations)
          e(gradient)         gradient vector
          e(mns)              vector of means of the independent variables
          e(rules)            information about perfect predictors
          e(V)                variance-covariance matrix of the estimators
          e(V_modelbased)     model-based variance
    
        Functions      
          e(sample)           marks estimation sample
    Code:
    * Your outreg2 call may look something like this
    probit DV rhs_vars, vce(robust)
    outreg2 using my_file, excel bdec(4) rdec(3) adec(3) se bracket addstat(Pseudo-R: , e(r2_p), Log-Likelihood:, e(ll),  Chi-squared, e(chi2), Prob Wald:, e(p))
    * bdec(4) rdec(3) adec(3) are the decimal places for the coefficients, R-squared, and user-added statistics, respectively
    Note that addstat() adds measures at the model-level. If you want the se, t-stat, p-value, and confidence interval for individual variables, you use the stats() option.

    From the outreg2 helpfile:
    Auxiliary Statistics (for each variable)
    stats( ) allows coef, se, tstat, pval, ci, aster, beta, blank; the default is stats(coef se)

    Comment


    • #3
      You are asking for a detailed table of regression estimates while outreg2 produces a nested table. asdoc can produce both. asdoc can be downloaded from SSC. The default in asdoc is to produce detailed regression tables. Below I present one example using asdoc's detailed regression tables.

      Code:
      webuse union
      asdoc probit union age grade not_smsa south##c.year, vce(cluster id) replace
      Click image for larger version

Name:	probit.png
Views:	1
Size:	46.6 KB
ID:	1483953


      asdoc can be used with almost all Stata commands. Here is a short blog post that shows how asdoc can be used with any Stata command http://fintechprofessor.com/2018/02/...basic-example/. You can also watch several YouTube videos that show the use of asdoc https://www.youtube.com/watch?v=zdI6...LwodAk2oqLYhr-

      Code:
      * For installation of the stable version 
      ssc install asdoc
      
      * For installation of the new beta version
      net install asdoc, from(http://fintechprofessor.com) replace
      help asdoc
      Regards
      --------------------------------------------------
      Attaullah Shah, PhD.
      Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
      FinTechProfessor.com
      https://asdocx.com
      Check out my asdoc program, which sends outputs to MS Word.
      For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

      Comment

      Working...
      X