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

Re: st: Testing two cell proportions using tab

From (Jeff Pitblado, StataCorp LP)
Subject   Re: st: Testing two cell proportions using tab
Date   Fri, 25 Apr 2008 11:42:47 -0500

Waldo, Daniel R. (CMS/ORDI) <> is interested in using
-test- after -svy: tabulate- but is concerned about getting different results
when options -row- and -se- are specified compared to when just the -row-
option is specified:

> I am perplexed by the results of some tabulations I ran in Stata10.
> Specifically, I am testing for the equality of two cells ... almost
> identical to the situation described at
> The commands
> svy: tab x1 x2 , row
> svy: tab x1 x2 , row se
> produce different variance-covariance matrices in e(V). The overall
> Pearson results appear identical.
> So, when I issue the command
> test _b[p11]=_b[p71]
> the first command produces results that I believe to be simply wrong -
> visual inspection of the two cell values being tested overwhelming
> suggests no statistically significant difference yet the F value
> produced is huge. The second command produces a very small F value.
> Having thought that the se option was merely for display purposes, I
> would appreciate any thoughts on these results, or on better ways to
> accomplish my task.

The documentation for the -se- option in -[SVY] svy: tabulate twoway- states
the following:

	se requests that the standard errors of cell proportions (the
		default), weighted counts, or row or column proportions be
		displayed.  When se (or ci, deff, or deft) is specified, only
		one of cell, count, row, or column can be selected.  The
		standard error computed is the standard error of the one

The last sentence points out that

	. svy: tab x1 x2, row se

results in -e(V)- containing the variances for the row proportions, whereas

	. svy: tab x1 x2, row

calculates the row proportions but uses the default setting (cell proportions)
for computing -e(V)-.  Note that consequently, the following command
combination results in an error:

	. svy: tab x1 x2, row
	(output omitted)

	. svy: tab, row se
	standard errors are only available for cells to compute row standard
	errors, rerun command with row and se options

*   For searches and help try:

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