版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
1、Fisher精確檢驗檢驗兩個二進制變量是否是獨立的。該檢驗可以分析 2x2列聯(lián)表,并產(chǎn)生精確 的p值,以檢驗以下假設:H 0:行變量和列變量是獨立的Hi:行變量和列變量是相關的Fisher精確檢驗中的p值對于所有樣本數(shù)量都是準確的,而當單元格計數(shù)較小 時,用于檢查相同假設的卡方檢驗的結果可能不準確。例如,可以使用Fisher精確檢驗來分析下面的競選結果列聯(lián)表,以確定投票是否獨立于投票人的性別。候選人A候選人B9262i35對于該表,F(xiàn)isher精確檢驗產(chǎn)生的p值為0.263。由于該p值大于常用的a 水平,因此數(shù)據(jù)與原假設一致。因而,沒有證據(jù)表明在競選中投票人的性別會影 響其選擇。您還可以使用F
2、isher精確檢驗來確定兩個總體比率是否相等。對于此應用,原 假設假定兩個總體比率是相等的(H o:p i = p );備擇假設可以是左尾(p i p 2),或雙尾(p i w p?)。Fisher精確檢驗作為兩個比率的檢驗十分 有用,因為它對于所有樣本數(shù)量都是準確的,而當事件數(shù)小于 5時,以及試驗 數(shù)減去事件數(shù)的結果小于5時,基于正態(tài)近似的2個比率的檢驗可能不準確。Fisher精確檢驗基于超幾何分布。因此,p值在表的邊際合計中是有條件的。實例:下面用 R語言實現(xiàn)檢驗:x=c(i,9,ii,3)alle 2 with default 30 used only for larger than 2
3、 by 2 tables. This says how many times as much space should be allocatedto paths as to keys: see filefexact.c in the sourcesof this package.orthe hypothesized odds ratio. Only used in the2 by 2 case.alternative indicates the alternative hypothesis and must be one oftwo.sided, greater or less. You ca
4、n specify just the initial letter. Only used in the2 by 2 case. logical indicating if a confidence interval for the oddsratio in a 2 by 2 table should be computed (and returned).conf.level confidence level for the returned confidence interval. Only used in the 2 by 2 case and if = TRUE.simulate.p. a
5、 logical indicating whether to compute p-values by Montevalue Carlo simulation, in larger than2 by 2 tables.Ban integer specifying the number of replicates used in theMonte Carlo test.DetailsIf x is a matrix, it is taken as a two-dimensional contingency table, and hence its entries should be nonnega
6、tive integers. Otherwise, both x and y must be vectors of the same length. Incomplete cases are removed, the vectors are coerced into factor objects, and the contingency table is computed from these.For 2 by 2 cases, p-values are obtained directly using the (central or non-central) hypergeometric di
7、stribution. Otherwise, computations are based on a C version of the FORTRAN subroutine FEXACT which implements the network developed by Mehta and Patel (1986) and improved by Clarkson, Fan and Joe (1993). The FORTRAN code can be obtained from HYPERLINK /toms/643 /toms/643 . Note this fails (with an
8、error message) when the entries of the table are too large. (It transposes the table if necessary so it has no more rows than columns. One constraint is that the product of the row marginals be less than2A31 - 1 .)For 2 by 2 tables, the null of conditional independence is equivalent to the hypothesi
9、s that the odds ratio equals one. Exact inference canbe based on observing that in general, given all marginal totals fixed, the first element of the contingency table has a non-central hypergeometric distribution with non-centrality parameter given by the odds ratio (Fisher, 1935). The alternative
10、for a one-sided test is based on the odds ratio, so alternative = greater is a test of the odds ratio being bigger than or.Two-sided tests are based on the probabilities of the tables, and take as more extreme all tables with probabilities less than or equal to that of the observed table, the p-valu
11、e being the sum of such probabilities.For larger than 2 by 2 tables and hybrid = TRUE, asymptotic chi-squared probabilities are only used if the Cochran conditions are satisfied, that is if no cell has count zero, and more than 80% of the cells have counts at least 5: otherwise the exact calculation
12、 is used.Simulation is done conditional on the row and column marginals, and works only if the marginals are strictly positive. (A C translation of thealgorithm of Patefield (1981) is used.)ValueA list with class htest containing the following components:p.value the p-value of the test.a confidence
13、interval for the odds ratio. Only present in the2 by 2 case and if argument = TRUE.estimatean estimate of the odds ratio. Note that theconditionalMaximum Likelihood Estimate (MLE) rather than the unconditional MLE (the sample odds ratio) is used. Only present in the 2 by 2 case.null.valuethe odds ra
14、tio under the null, or. Only present in the2 by2 case.alternative method a character string describing the alternative hypothesis. the character string Fishers Exact Test for Count Data.a character string giving the names of the data.ReferencesAgresti, A. (1990) Categorical data analysis . New York:
15、 Wiley. Pages 59 - 66.Agresti, A. (2002) Categorical data analysis . Second edition. New York: Wiley. Pages 91 - 101.Fisher, R. A. (1935) The logic of inductive inference. Journal of the Royal Statistical Society Series A 98, 39 - 54.Fisher, R. A. (1962) Confidence limits for a cross-product ratio.A
16、ustralian Journal of Statistics4, 41.Fisher, R. A. (1970) Statistical Methods for Research Workers. Oliver & Boyd.Mehta, C. R. and Patel, N. R. (1986) Algorithm 643. FEXACT: A Fortran subroutine for Fishers exact test on unorderedr*c contingency tables.ACM Transactions on Mathematical Software , 12,
17、 154 - 161.Clarkson, D. B., Fan, Y. and Joe, H. (1993) A Remark on Algorithm 643: FEXACT: An Algorithm for Performing Fishers Exact Test inr x cContingency Tables. ACM Transactions on Mathematical Software , 19, 484 488.Patefield, W. M. (1981) Algorithm AS159. An efficient method of generating r x c
18、 tables with given row and column totals.Applied Statistics 30,91 -97.See Alsochisq.testfisher.exact in package exact2x2 for alternative interpretations of two-sided tests and confidence intervals for2 by 2 tables.Examples# Agresti (1990, p. 61f; 2002, p. 91) Fishers Tea Drinker# A British woman cla
19、imed to be able to distinguish whether milk or# tea was added to the cup first. To test, she was given 8 cups of# tea, in four of which milk was added first. The null hypothesis# is that there is no association between the true order of pouring# and the womans guess, the alternative that there is a positive# association (that the odds ratio is greater than 1).TeaTasting p = 0.2429, association
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025-2030融資租賃行業(yè)融資租賃創(chuàng)新金融租賃市場競爭市場研討
- 文物法考試題及答案文庫
- 山東2025年山東出入境邊防檢查總站所屬事業(yè)單位招聘11人筆試歷年參考題庫附帶答案詳解
- 安徽2025年岳西縣事業(yè)單位引進10名急需緊缺專業(yè)人才筆試歷年參考題庫附帶答案詳解
- 安慶2025年安徽安慶桐城市總工會招聘勞務派遣人員筆試歷年參考題庫附帶答案詳解
- 2025年拍賣師資格考試試題及答案解析
- 大理云南大理海關招聘口岸業(yè)務工作協(xié)管員18人筆試歷年參考題庫附帶答案詳解
- 四川2025年應急管理部四川消防研究所招聘博士11人筆試歷年參考題庫附帶答案詳解
- 四川2025上半年四川省文化和旅游廳下屬事業(yè)單位招聘64人筆試歷年參考題庫附帶答案詳解
- 嘉興2025年浙江嘉興秀洲區(qū)高照街道招聘消防工作人員(第二批)10人筆試歷年參考題庫附帶答案詳解
- 綠電直連政策及新能源就近消納項目電價機制分析
- 2026屆江蘇省常州市生物高一第一學期期末檢測試題含解析
- 2026年及未來5年市場數(shù)據(jù)中國高溫工業(yè)熱泵行業(yè)市場運行態(tài)勢與投資戰(zhàn)略咨詢報告
- 教培機構排課制度規(guī)范
- 2026年檢視問題清單與整改措施(2篇)
- 認識時間(課件)二年級下冊數(shù)學人教版
- 2026屆陜晉青寧四省高三語文二次聯(lián)考(天一大聯(lián)考)作文題目解析及范文:“避”的抉擇價值判斷與人生擔當
- 【四年級】【數(shù)學】【秋季上】期末家長會:數(shù)海引航愛伴成長【課件】
- 律師掛靠協(xié)議書
- (2025)意大利多學科工作組共識聲明:努南綜合征的多學科治療
- 車位使用權抵債協(xié)議書
評論
0/150
提交評論