Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: RE: Re: chi squared matrix


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: RE: Re: chi squared matrix
Date   Mon, 22 Nov 2004 19:46:25 -0000

Please see the documentation of the -listwise- option 
where this is explained. Perhaps a meta-caution that
users should read the help is needed. 

Chi-square on a binary variable and itself returns 
the number of observations. This is an ineluctable 
algebraic consequence of what is being done. 

Nick 
[email protected] 

Daniel Egan
 
> Thanks to Nick and Michael, but.....
> 
> While the makematrix worked correctly, I ran into an interesting
> "quirk".  It is something I need to fix, but one of the indicators has
> missing values for a substantial number of observations.)
> 
> This causes problems with makematrix in the following manner:
> 
> When I
> tab2 ill_*, chi2
> Stata goes variable by variable, and for those variables that have the
> full 18k obs, uses all obs. when it comes to ill_problem crosstabs, it
> reduces to 15k because of missings.
> 
> However, when doing
> makematrix testchi, from(r(chi2)): tab2 ill_*, chi2
> _all_ of the calculation are based on the smallest common sample size,
> or the 15k.
> 
> This doesn't matter too much to me, since there shouldn't be missings
> in the indicator, but it might be good to issue a caution about it.
> 
> FYI, the only reason I noticed was because the diagonal _was_ the
> smaller observation size (15K). I do not know why the diagonal was the
> number of observations - does this have to do with makematrix or chi2?

*
*   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/



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