From | Gary Longton <[email protected]> |
To | [email protected] |
Subject | Re: st: Problem with -ci- in particular dataset |
Date | Wed, 04 May 2005 13:43:23 -0700 |
Philip Greenwood wrote:
I'm having a little trouble with the -ci- command with several binary variables in a particular dataset. The problem is reproducible on other machines with this dataset, but not with other datasets. The problem is that -ci- displays 0 for all statistics, yet the correct results are returned to macros. I'll paste some output;
*--snip
. ci var1 Variable | Obs Mean Std. Err. [95% Conf. Interval] -------------+--------------------------------------------------------------- var1 | 1102 0 0 0 0 . return list scalars: r(ub) = .2770129342413987 r(lb) = .2257093888076031 r(se) = .0130734919800961 r(mean) = .2513611615245009 r(N) = 1102
It appears that -ci- uses the display format of the binary variable for its output format (I'm still in version 8.2, so can't yet speak for version 9). My guess is that your var1 has a fixed display format such as %3.0f. A change to a %g format (eg. -format var1 %4.0g-) or an %f format with a non-zero value for the # decimal places should result in output with more precision.Other commands such as -summarize- are not producing the same problem. All I can think of is that the displayed values are getting rounded to integer values somehow. -ci- normally works fine. Does anyone have any suggestion as what is wrong with my dataset?
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |