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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: chi-square-test in matrix or crosstab


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: chi-square-test in matrix or crosstab
Date   Fri, 18 Jun 2010 11:47:52 +0100

Not quite clear about your set-up, but -tab_chi- on SSC contains various immediate commands which go a bit beyond official -tabi-. 

Nick 
n.j.cox@durham.ac.uk 

Wetzel Martin

I'm looking for a opportunity to make chi-square-tests of already acummulated data.
I have something like this

sysuse auto.dta, clear
tab2 rep78 foreign, matcell(A)

matrix list A

and now I want to test this matrix for statistical independence. If the matrix would always have the same size, I could use William Gould's (2006)*  mata-strategy, but it's looped over vars, so I could need a more flexible way.
Has anyone an idea?

* Gould (2006): Mata Matters: Interactive use. The Stata Journal 6 (3). pp. 387-396.

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