Statalist


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

Re: st: I would like to show integral zero in the result


From   Eric Booth <[email protected]>
To   [email protected]
Subject   Re: st: I would like to show integral zero in the result
Date   Sun, 17 Jan 2010 21:46:19 -0600

>
Sorry, my last post  was wrong...I didn't notice that -estimates table-  didn't return the OR.  
I couldn't figure out how to get -estimates table- to return the OR, so here it is with -outreg2- :

*----------------------------------BEGIN
clear*
input outcome exposure
1 0
1 3
0 2
0 2
end

logistic outcome exposure
est sto model

//est table doesn't return the ORs
est table model,  b(%09.8f) se(%09.8f) stfmt(%09.8f) drop(_cons)
mat A=e(b)
mat li A

**
outreg2 using "/users/ppri/desktop/test.xls", replace eform cti(odds ratio) auto(6) nocons side
*----------------------------------END

I'd be interested in finding out how to get the ORs into -est table- .


~ Eric
__
Eric A. Booth
Public Policy Research Institute
Texas A&M University
[email protected]
Office: +979.845.6754


On Jan 17, 2010, at 9:04 PM, Eric Booth wrote:

> <>
> 
> 
> On Jan 17, 2010, at 7:43 PM, Ichiro M. Omori wrote:
> 
>> Dear Statalist,
>> 
>> I am using Stata/SE 11 for Windows.
>> 
>> I would like to show integral zero in the result.
>> 
>> For example, the result of the command "display 1/10" is ".1".
>> I would like to make it "0.1".
>> 
> 
> 
> **
> di  %02.1f  =  1/10 
> **
> 
> Also, take a look at -help format- and -help display-.
> 
> 
>> Other example is;
>> ----------------------------
>> input outcome exposure
>> 1 0
>> 1 3
>> 0 2
>> 0 2
>> end
>> logistic outcome exposure
>> -----------------------------
>> 
>> Results of these commands are
>> 
>> ------------------------------------------------------------------------------
>>    outcome | OR   Std. Err.      z    P>|z|     [95% Conf.Interval]
>> -------------+----------------------------------------------------------------
>>   exposure |   .6454743  .6283999   -0.45   0.653   .0957622  4.350749
>> ------------------------------------------------------------------------------
>> 
>> I would like to display OR as "0.6454743", not ".6454743".
>> 
> 
> *----------------------------------BEGIN
> clear*
> input outcome exposure
> 1 0
> 1 3
> 0 2
> 0 2
> end
> 
> logistic outcome exposure
> 
> est sto model
> est table model,  b(%06.4f) se(%06.4f) stfmt(%06.4f) 
> *----------------------------------END
> 
> Better still, take a look at the help files for programs like -estout- or -outreg2-.
> 
> 
> ~ Eric
> 
> __
> Eric A. Booth
> Public Policy Research Institute
> Texas A&M University
> [email protected]
> Office: +979.845.6754
> 
> 




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index