Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: estout p-values after lrtest

From   raoul reulen <>
Subject   st: estout p-values after lrtest
Date   Tue, 26 Jun 2012 11:23:47 +0100

Hi All

I am using Ben Jann's estout to store estimates in an excel table
after I ran a logistic regression model. Now I also want to store
p-values from a likelihood-ratio test in a separate column, but these
are stored as a scalar. How do I store the p-value in a matrix? I do
not want the p-value below the regression coefficient using the
"stats" option, but in a separate colum on the same row as the
regression coefiicient.  I cannot get it done and should be grateful
for any help!

***begin example**

sysuse auto , clear
logistic foreign headroom
est store model1
logistic foreign
est store model2

lrtest model1 model2

matrix pval = r(p)
mat pval[1,1] = r(p)
estadd matrix pval:model1
estout model1  using "example.xls" , cells("b ci  pval") drop(_cons)
type replace

**end example***

Many thanks.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index