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]

RE: st: Mcnemar using mcc command


From   "rasool.bux" <rasool.bux@aku.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Mcnemar using mcc command
Date   Mon, 5 Nov 2012 11:36:14 +0000

Dear Maarten,

Thanks for the help, it worked.
Rasool Bux

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Maarten Buis
Sent: Monday, November 05, 2012 3:55 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Mcnemar using mcc command

On Mon, Nov 5, 2012 at 11:21 AM, rasool.bux wrote:
> I want to run Mcnemar test in stata. The mcc command is not giving correct results.

You seem to have coded your variables as 1,2 instead of 0,1:

*----------- begin example ------------- webuse mccxmpl, clear // code unexposed /exposed as 1, 2 // instead of 0, 1 gen case_wrong = case + 1 gen control_wrong = control + 1

// add some labels
label define lab 1 "no" 2 "yes"
label val case_wrong control_wrong lab

// see the crosstab
tab case_wrong control_wrong [fw=pop]

// -mcc- looks all wrong
mcc case_wrong control_wrong [fw=pop]

// if you use the 0,1 coding
// everything looks fine again
mcc case control [fw=pop]
*------------ end example -------------- (For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2742 / Virus Database: 2617/5874 - Release Date: 11/04/12

________________________________

This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index