Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: McNemar test for survey data


From   "Roger B. Newson" <[email protected]>
To   [email protected]
Subject   Re: st: McNemar test for survey data
Date   Sun, 05 Jan 2014 17:39:58 +0000

This problem can probably be solved using -somersd-, -regpar-, -binreg-, -glm-, or some other package that can estimate diferences between 2 proportions for clustered data. The first step would be to reshape your data (using either -reshape- or -expgen-) to have 1 observation per study subject per binary test (and therefore 2 observations per study subject as there are 2 binary tests). The binary outcome, in this dataset, would be the test result. For each study subject, it would be the outcome of the first binary test in the first observation for that subject, and the outcome of the second binary test in the second outcome. And the dataset would contain a variable, maybe called -testid-, with the value 1 in observations representing the first test, and 2 in observations representing the second test. The confidence interval to be calculated would be for the difference between 2 proportions, namely the proportion of positive outcomes where -testid- is 2 and the proportion o positive results where -testid- is 1.

You do not say what the sampling design is for your complex survey data. However, if this design has clusters, then they will be the clusters to use when estimating your difference between proportions. And, if this design does not have clusters, then the clusters used, when stimating your difference between proportions, will be the study subjects themselves. Either way, your final estimate will be clustered.

I hope thhis helps. Let me know if you have any further queries.

Best wishes

Roger

Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology, Occupational Medicine
and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected]
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/

Opinions expressed are those of the author, not of the institution.

On 05/01/2014 16:55, Ankit Sakhuja wrote:
Dear Members,
I am trying to compare two categorical variables which are not
mutually exclusive such that participants with a positive result in
one group (using method 1) also have a positive result in second group
(using method 2). Now say 30% have positive result by method 1 and 20%
by method two, how can I say that these results are in fact similar or
different? I could potentially use McNemar's but it is a complex
survey data and I am not sure how to go ahead with that. I have seen
discussions about using -somersd- but not sure how to exactly use it
with this data. Would really appreciate any help.
Ankit
*
*   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/

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