マクネマー検定のソースを表示
←
マクネマー検定
ナビゲーションに移動
検索に移動
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
'''マクネマー検定'''(マクネマーけんてい、McNemar's test)は、[[統計学]]において、対応のある名目データに用いられる[[仮説検定]]である。 二値変数に関するマッチドペアの2x2[[分割表]]に適用され、行と列の限界度数が正しいかどうか(限界均一性があるかどうか)を判定する。1947年に導入したクイン・マクネマーにちなんで名付けられた<ref name="McNemar1947">{{Cite journal|last=McNemar|first=Quinn|date=June 18, 1947|title=Note on the sampling error of the difference between correlated proportions or percentages|journal=Psychometrika|volume=12|issue=2|pages=153–157|DOI=10.1007/BF02295996|PMID=20254758}}</ref>。遺伝学における応用例として、[[連鎖不平衡]]を検出するための伝達不平衡検定がある<ref name="Spielman93">{{Cite journal|last=Spielman RS|last2=McGinnis RE|last3=Ewens WJ|date=Mar 1993|title=Transmission test for linkage disequilibrium: the insulin gene region and insulin-dependent diabetes mellitus (IDDM)|journal=Am J Hum Genet|volume=52|issue=3|pages=506–16|PMID=8447318|PMC=1682161}}</ref>。 医学分野では、主に[[感度 (医学)|感度]](病気の人を正しく識別する能力)と[[特異度]](病気のない人を正しく識別する能力)によって検査を評価する。同じグループの患者に対して2つのテストを行い、その感度と特異度が同じであれば両方の検査が同等であると考えがちだが、そうではないかもしれない。このため、私たちは病気のある患者と病気のない患者を調査したり、これら2つのテストが一致しない部分を見つけたりする必要がある。これがまさにマクネマーの検定の基礎であり、同じグループの患者に対する2つの診断テストの感度と特異度を比較する<ref>{{Cite journal|last=Hawass|first=N E|date=April 1997|title=Comparing the sensitivities and specificities of two diagnostic procedures performed on the same group of patients.|journal=The British Journal of Radiology|volume=70|issue=832|pages=360–366|DOI=10.1259/bjr.70.832.9166071|ISSN=0007-1285|PMID=9166071}}</ref>。 == 定義 == この検定は、n 人の被験者の標本に対する 2 つの検査の結果の 2x2分割表に、次のように適用される。 <center> {| class="wikitable" style="text-align:center" |- | || 検査2 陽性 || 検査2 陰性 || 行合計 |- | 検査1 陽性 || ''a'' || ''b'' || ''a'' + ''b'' |- | 検査1 陰性 || ''c'' || ''d'' || ''c'' + ''d'' |- | 列合計 || ''a'' + ''c'' || ''b'' + ''d'' || ''N'' |}</center> 限界均一性の[[帰無仮説]]とは、各結果に対する2つの限界確率が同じであるというもので、''p<small>a</small> + p<sub>b</sub> = p<small>a</small> + p<sub>c</sub>'' かつ ''p<sub>c</sub> + p<sub>d</sub> = p<sub>b</sub> + p<sub>d</sub>'' に対応する。 したがって、帰無仮説H<sub>0</sub>と対立仮説H<small>1</small>は<ref name="McNemar1947">{{Cite journal|last=McNemar|first=Quinn|date=June 18, 1947|title=Note on the sampling error of the difference between correlated proportions or percentages|journal=Psychometrika|volume=12|issue=2|pages=153–157|DOI=10.1007/BF02295996|PMID=20254758}}</ref> : <math> \begin{align} H_0 & :~p_b=p_c \\ H_1 & :~p_b \ne p_c \end{align} </math> ここで、''p<small>i</small>'' (i = a, b, c, d) は、対応するラベルを持つセルでの発生する確率を示す。 マクネマー検定の[[検定統計量]]は次の通り。 : <math>\chi^2 = \frac{(b-c)^2}{b+c}</math> 帰無仮説のもと、検査間で十分な数の不一致(セルbおよびセルcに相当)がある場合、<math>\chi^2</math> は[[自由度]]1の[[カイ二乗分布]]となる。もし、この <math>\chi^2</math> の結果が有意であれば、帰無仮説が棄却され、''p<sub>b</sub> ≠ p<sub>c</sub>''(限界比率が有意に異なる)という対立仮説が支持される。 === バリエーション === ''b''や''c''が小さい場合(''b +'' ''c'' ''< 25'')、<math>\chi^2</math>はカイ二乗分布では十分に近似されず{{要出典|date=June 2011}}、正確二項検定を使用する。ここで、''b'' は、サイズパラメータ''n ='' ''b +'' ''c'' および ''p'' = 0.5の[[二項分布]]と比較される。''b'' ''''≥ c''''の場合、 : <math> \text{exact-P-value} = 2 \sum_{i=b}^{n} {n\choose i}0.5^i(1-0.5)^{n-i},</math> これは、 ''p'' = 0.5、''n'' = ''b'' + ''c''の二項分布累積分布関数に2を乗じたものである。 エドワーズは、二項の正確なP値を近似するため、連続性を補正した次のバージョンを提案した<ref name="Edwards1948">{{Cite journal|last=Edwards|first=A|date=1948|title=Note on the "correction for continuity" in testing the significance of the difference between correlated proportions|journal=Psychometrika|volume=13|issue=3|pages=185–187|DOI=10.1007/bf02289261|PMID=18885738}}</ref>。 : <math>\chi^2 = {(|b-c|-1)^2 \over b+c}.</math> mid-P マクネマー検定は、正確な片側P値から観察された bの確率の半分を引き、それを2倍して両側の mid-P 値を得ることによって計算される<ref name="Lancaster1961">{{Cite journal|last=Lancaster|first=H.O.|date=1961|title=Significance tests in discrete distributions.|journal=J Am Stat Assoc|volume=56|issue=294|pages=223–234|DOI=10.1080/01621459.1961.10482105}}</ref> <ref name="Fagerland2013">{{Cite journal|last=Fagerland|first=M.W.|last2=Lydersen|first2=S.|last3=Laake|first3=P.|date=2013|title=The McNemar test for binary matched-pairs data: mid-p and asymptotic are better than exact conditional|journal=BMC Medical Research Methodology|volume=13|pages=91|DOI=10.1186/1471-2288-13-91|PMID=23848987|PMC=3716987}}</ref> : <math> \text{mid-p-value} = 2 \left( \sum_{i=b}^n {n\choose i} 0.5^i (1-0.5)^{n-i} - 0.5 {n\choose b} 0.5^b (1-0.5)^{n-b} \right)</math> これは次と同等である。 : <math> \text{mid-p-value} = \text{exact-p-value} - {n\choose b}0.5^b(1-0.5)^{n-b}</math> ここで、第2項は[[二項分布]]の[[確率質量関数|確率質量関数で]]あり、''n'' = ''b'' + ''c'' である。一般的なソフトウェアパッケージでは、二項分布関数を容易に入手してマクネマーのmid-P検定を簡単に計算することができる<ref name="Fagerland2013">{{Cite journal|last=Fagerland|first=M.W.|last2=Lydersen|first2=S.|last3=Laake|first3=P.|date=2013|title=The McNemar test for binary matched-pairs data: mid-p and asymptotic are better than exact conditional|journal=BMC Medical Research Methodology|volume=13|pages=91|DOI=10.1186/1471-2288-13-91|PMID=23848987|PMC=3716987}}</ref>。 従来は、''b + c < 25'' のときに正確な二項検定を使用べきと言われていた。しかし、シミュレーションによると、正確二項検定と連続性補正を用いたマクネマー検定の両方が過度に保守的であることが示されている<ref name="Fagerland2013">{{Cite journal|last=Fagerland|first=M.W.|last2=Lydersen|first2=S.|last3=Laake|first3=P.|date=2013|title=The McNemar test for binary matched-pairs data: mid-p and asymptotic are better than exact conditional|journal=BMC Medical Research Methodology|volume=13|pages=91|DOI=10.1186/1471-2288-13-91|PMID=23848987|PMC=3716987}}</ref>。''b +'' ''c < 6'' のとき、正確P値は常に共通の有意水準0.05を超える。オリジナルのマクネマー検定は最も強力だったが、しばしば僅かに非保守的であった。mid-Pバージョンは、漸近的なマクネマー検定と同じくらい強力で、名目上の有意水準を超えることはなかった。 == 例 == 最初の例では、ある研究者が、ある薬が特定の病気に効果があるかどうかを調べようとしている。表には個人の数が示されており、行には治療前の診断(病気があるかないか)が、列には治療後の示されている。この検定では、前後の測定に同じ被験者を含める必要がある(マッチドペア)。 <center> {| class="wikitable" style="text-align:center" |- | || '''治療後:'''疾病あり || '''治療後:'''疾病なし || 行合計 |- | '''治療前:'''疾病あり || 101 || 121 || 222 |- | '''治療後:'''疾病なし || 59 || 33 || 92 |- | 列合計 || 160 || 154 || 314 |}</center> この例では、「限界均一性」の帰無仮説は、治療の効果がなかったことを意味する。上記のデータから、マクネマー検定統計量は : <math>\chi^2 = {(121 - 59)^2 \over {121 + 59}}</math> この値は21.35であり、帰無仮説が意味する分布に従う可能性は極めて低い( ''P'' <0.001)。したがって、この検定は、治療効果がないという帰無仮説を棄却するための強力な証拠となる。 2番目の例は、漸近的マクネマー検定とそれ以外の検定との違いを示す<ref name="Fagerland2013">{{Cite journal|last=Fagerland|first=M.W.|last2=Lydersen|first2=S.|last3=Laake|first3=P.|date=2013|title=The McNemar test for binary matched-pairs data: mid-p and asymptotic are better than exact conditional|journal=BMC Medical Research Methodology|volume=13|pages=91|DOI=10.1186/1471-2288-13-91|PMID=23848987|PMC=3716987}}</ref>。データテーブルは先ほどと同様だが、セル内の数字が異なる。 <center> {| class="wikitable" style="text-align:center" |- | || '''治療後:'''疾病あり || '''治療後:'''疾病なし || 行合計 |- | '''治療前:'''疾病あり || 59 || 6 || 65 |- | '''治療前:'''疾病なし || 16 || 80 || 96 |- | 列合計 || 75 || 86 || 161 |}</center> これらのデータでは、サンプルサイズ(161人)は小さくないが、マクネマー検定と他のバージョンでは結果が異なる。正確二項検定では''P'' = 0.053が得られ、連続性補正を使用したマクネマー検定では <math>\chi^2</math> = 3.68、''P'' = 0.055 となる。漸近的なマクネマーの検定では<math>\chi^2</math>= 4.55、''P'' = 0.033となり、mid-P マクネマー検定では''P'' = 0.035が得られる。 == 議論 == 興味深いことに、対角成分は(治療前または治療後のどちらの状態がより好ましいかという)決定に寄与しない。全体の症例数が多くても、''b + c'' が少なければ、統計的検出力が小さくなる。 マクネマー検定を拡張することで、ペア間での独立性が担保されない場合を扱うことができる。ペアデータのクラスタがあり、クラスタ内のペアは独立ではないかもしれないが、異なるクラスタ間では独立性が成り立つ者とする<ref>{{Cite journal|last=Yang|first=Z.|last2=Sun|first2=X.|last3=Hardin|first3=J.W.|year=2010|title=A note on the tests for clustered matched-pair binary data|journal=Biometrical Journal|volume=52|issue=5|pages=638–652|DOI=10.1002/bimj.201000035|PMID=20976694}}</ref>。例えば、歯科治療の効果を分析する場合、ペアは、複数の歯を治療した患者の個々の歯の治療に対応し、同じ患者の2本の歯の治療の効果は独立ではない可能性が高いが、異なる患者の2本の歯の治療は独立である可能性が高い<ref>{{Cite journal|last=Durkalski|first=V.L.|last2=Palesch|first2=Y.Y.|last3=Lipsitz|first3=S.R.|last4=Rust|first4=P.F.|year=2003|title=Analysis of clustered matched-pair data|url=http://www3.interscience.wiley.com/journal/104545274/abstract|journal=Statistics in Medicine|volume=22|issue=15|pages=2417–28|accessdate=April 1, 2009|DOI=10.1002/sim.1438|PMID=12872299}}</ref>。 === ペアリングの情報 === 1970年代には、扁桃腺を温存することで[[ホジキンリンパ腫]]の予防になるのではないかと考えられていた。ジョン・ライスによると <ref name="Rice1995">{{Cite book|year=1995|last=Rice, John|title=Mathematical Statistics and Data Analysis|url=https://archive.org/details/mathematicalstat00rice_559|edition=Second|publisher=[[Duxbury Press]]|location=Belmont, California|isbn=978-0-534-20934-6|pages=[https://archive.org/details/mathematicalstat00rice_559/page/n510 492]–494}}</ref><blockquote>85人のホジキンリンパ腫の患者[...]には、疾病に罹患しておらず、患者との年齢差が5歳以内の同性の兄弟がいた。研究者は次の表を発表した。 :: <math> \begin{array}{c|c|c} \hline & \text{Tonsillectomy} & \text{No tonsillectomy} \\ \hline\text{Hodgkins} & 41 & 44 \\ \hline\text{Control} & 33 & 52 \end{array} </math> 彼らはカイ二乗統計を計算し[...] [彼らは]誤ってペアリングを無視して分析した。[...] [彼らの]兄弟がペアになっているため、サンプルは独立していなかった[...] 我々はペアリングを示す表を作成した。 : <math> \begin{array}{cc} & \text{Sibling} \\ \text{Patient} & \begin{array}{c|c|c} \hline & \text{No tonsillectomy} & \text{Tonsillectomy} \\ \hline\text{No tonsillectomy} & 37 & 7 \\ \hline\text{Tonsillectomy} & 15 & 26 \end{array} \end{array} </math> </blockquote>マクネマーの検定を適用できるのは2つ目の表である。 2番目の表の数の合計が85(兄弟の''ペア''の数)であるのに対し、最初の表の数の合計は2倍の170(個人の数)であることに注意。 1つ目の表は2つ目の表の限界値を示しているに過ぎず、2つ目の表の方が情報量が多い。 == 関連する検定 == * 二項符号検定は、マクネマー検定の正確な検定を提供する。 * コクランのQ検定は、3つ以上の「処理」に対するマクネマー検定の拡張である。 * リデルの正確確率検定は、マクネマーの検定の正確な代替手段である<ref>{{Cite journal|last=Liddell|first=D.|year=1976|title=Practical Tests of 2 × 2 Contingency Tables|journal=Journal of the Royal Statistical Society|volume=25|issue=4|pages=295–304|JSTOR=2988087}}</ref> <ref>{{Cite web|url=http://rimarcik.com/en/navigator/z-nominal.html|title=Maxwell's test, McNemar's test, Kappa test|publisher=Rimarcik.com|date=|accessdate=2012-11-22}}</ref>。 * スチュアート-マクスウェル検定は、マクネマー検定の異なる一般化であり、2行/列を超える正方形のテーブルの限界均一性を検定するために使用される<ref>{{Cite web|url=http://www2.sas.com/proceedings/forum2008/382-2008.pdf|title=Generalized McNemar's Test for Homogeneity of the Marginal Distributions|first=Xuezheng|author=Sun|publisher=[[SAS (software)|SAS]] Global Forum|year=2008|accessdate=2021-09-29}}</ref> <ref>{{Cite journal|last=Stuart|first=Alan|year=1955|title=A Test for Homogeneity of the Marginal Distributions in a Two-Way Classification|journal=Biometrika|volume=42|issue=3/4|pages=412–416|DOI=10.1093/biomet/42.3-4.412|JSTOR=2333387}}</ref> <ref>{{Cite journal|last=Maxwell|first=A.E.|year=1970|title=Comparing the Classification of Subjects by Two Independent Judges|journal=The British Journal of Psychiatry|volume=116|issue=535|pages=651–655|DOI=10.1192/bjp.116.535.651|PMID=5452368}}</ref>。 * Bhapkarのテスト(1966)は、スチュアート・マクスウェル検定のより強力な代替手段だが<ref>{{Cite web|url=http://www.john-uebersax.com/stat/mcnemar.htm#bhapkar|title=McNemar Tests of Marginal Homogeneity|publisher=John-uebersax.com|date=2006-08-30|accessdate=2012-11-22}}</ref> <ref>{{Cite journal|last=Bhapkar|first=V.P.|year=1966|title=A Note on the Equivalence of Two Test Criteria for Hypotheses in Categorical Data|journal=Journal of the American Statistical Association|volume=61|issue=313|pages=228–235|DOI=10.1080/01621459.1966.10502021|JSTOR=2283057}}</ref>、リベラルな傾向がある。現存する方法の競争力のある代替手段が利用可能。 <ref>{{Cite journal|last=Yang|first=Z.|last2=Sun|first2=X.|last3=Hardin|first3=J.W.|year=2012|title=Testing Marginal Homogeneity in Matched-Pair Polytomous Data|journal=Therapeutic Innovation & Regulatory Science|volume=46|issue=4|pages=434–438|DOI=10.1177/0092861512442021}}</ref> * マクネマー検定は、[[コクラン・マンテル・ヘンツェルの統計量|コクラン・マンテル・ヘンツェル検定]]の特殊なケース。これは、Nペアのそれぞれに1つの層があり、各層に、ペアのバイナリ応答を示す2x2テーブルを使用するCMHテストと同等である<ref>{{Cite book|last=Agresti|first=Alan|date=2002|title=Categorical Data Analysis|url=https://mathdept.iut.ac.ir/sites/mathdept.iut.ac.ir/files/AGRESTI.PDF|location=Hooken, New Jersey|publisher=John Wiley & Sons, Inc.|page=413|isbn=978-0-471-36093-3}}</ref>。 == 関連項目 == * ピアソンのカイ二乗検定 * [[カイ二乗分布]] == 脚注 == {{Reflist}} == 外部リンク == * [http://faculty.vassar.edu/lowry/propcorr.html ヴァサー大学のマクネマー2×2分割表] * [http://john-uebersax.com/stat/mcnemar.htm 限界均一性のマクネマー検定] {{統計学}} {{DEFAULTSORT:まくねまあけんてい}} [[Category:ノンパラメトリック統計学]] [[Category:統計検定]]
このページで使用されているテンプレート:
テンプレート:Cite book
(
ソースを閲覧
)
テンプレート:Cite journal
(
ソースを閲覧
)
テンプレート:Cite web
(
ソースを閲覧
)
テンプレート:Reflist
(
ソースを閲覧
)
テンプレート:統計学
(
ソースを閲覧
)
テンプレート:要出典
(
ソースを閲覧
)
マクネマー検定
に戻る。
ナビゲーション メニュー
個人用ツール
ログイン
名前空間
ページ
議論
日本語
表示
閲覧
ソースを閲覧
履歴表示
その他
検索
案内
メインページ
最近の更新
おまかせ表示
MediaWiki についてのヘルプ
特別ページ
ツール
リンク元
関連ページの更新状況
ページ情報