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:04:57 -0600

<>


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