Claude Francoeur wrote:
I want to compare the frequency of a dichotomic variable (POSAR) for
subgroups. The group variable is called GROUP and contains 4 subgroups.
What would be the right command to compare POSAR for two subgroups, say
group1 and group2 and perform a chi2 test of the difference of frequencies?
--------------------------------------------------------------------------------
I'm not sure that I follow you completely, but try something like the
following to see whether it does what you're looking for:
tabulate POSAR GROUP if inlist(GROUP, group1, group2), chi2 lrchi2
Joseph Coveney
*
* 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/