Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Csgof does not count var categories with zero observations


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Csgof does not count var categories with zero observations
Date   Thu, 7 Jun 2012 00:29:07 +0100

-csgof- is a user-written program from
http://www.ats.ucla.edu/stat/stata/ado/analysis/

The Statalist FAQ advises at
http://www.stata.com/support/faqs/res/statalist.html#stata

"Say what command(s) you are using. If they are not part of official
Stata, say where they come from: the STB/SJ, SSC, or other archives."

See -chitest- and -chitesti- from -tab_chi- (SSC) for alternatives.
The examples in the help files are pertinent.

Another alternative is to use Mata. Many chi-square problems reduce to
a few lines of Mata.

Nick

On Wed, Jun 6, 2012 at 10:56 PM, Tara Johnson <tjohnsonrogers@gmail.com> wrote:

> I want to conduct a chi-square goodness of fit test. The problem is I
> have a variable with multiple categories with no observations. When I
> run csgof, Stata does not include the categories with no observations.
> How do I get Stata to count the categories which could be there in
> principle but which in practice don't exist?
>
> Thanks,
>
> Tara
> *
> *   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/

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index