[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
jpitblado@stata.com (Jeff Pitblado, StataCorp LP) |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Why does the ci option affect what -svytab- stores in e(b)? |

Date |
Mon, 20 Sep 2004 14:41:28 -0500 |

Emma Slaymaker <Emma.Slaymaker@lshtm.ac.uk> asks why -svytab- saves different things in -e(b)- only when the -ci- option is specified: > I am extracting the estimation results returned by -svytab- and find > that without the -ci- option the command puts the cell proportions into > both e(b) and the cell proportions matrix e(Prop) , regardless of the > options (-row- -col- -percent-) which control how the results are > displayed on the screen. > > However, when the -ci- option is specified then e(b) contains row > percentages, or whatever is specified using those options. Now that > makes perfect sense to me, so why does e(b) ignore the -row- and > -percent- options when -ci- is not specified? Given that the > proportions are already stored in e(Prop) it seems unnecessary for e(b) > to store these and not whatever is displayed on screen. > > Why does it do this? > > You may well ask "Why do I care?". The answer is that I am repeating > many -svytab- commands on large datasets and extracting these results. > I'm assuming (perhaps wrongly) that adding the -ci- option slows down > the command and it doesn't help me because, as stata doesn't store the > CI, I have to calculate them after the command in order to export them. -svytab- is an estimation command, setting up the matrices -e(b)- and -e(V)-. Thus one can use -test- and -lincom- after -svytab- to perform linear hypothesis tests on the estimated proportions/row totals/column .../<statistic> for each cell of the produced table. When the -ci- option is specified, -svytab- produces the variance-covariance matrix of the estimated cell values (whatever they may be) in order to compute the respective confidence intervals. Specifying the -ci- option with -row- (or any other such option) indicates that you are really interested in inference regarding said statistic, thus -svytab- goes to the extra effort to post the requested statistics in -e(b)- and their variance-covariance matrix in -e(V)- for later use with -test- and -lincom-. With the exception of very large datasets (tables), specifying the -ci- option should not cause a significant slow down. --Jeff jpitblado@stata.com * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**Re: st: Weird ylabel justification on Stata for the Mac** - Next by Date:
**st: VS: Still gllamm** - Previous by thread:
**st: Why does the ci option affect what -svytab- stores in e(b)?** - Next by thread:
**st: Revised versions of -hshaz-, -pgmhaz8- on SSC** - Index(es):

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