[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Why does the ci option affect what -svytab- stores in e(b)?
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
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
With the exception of very large datasets (tables), specifying the -ci- option
should not cause a significant slow down.
* For searches and help try: