rank sum test in R vs. MATLAB: exact p-value when ties are ...
文章推薦指數: 80 %
Dear masters of R and MATLAB! As documented, the rank sum test in R can not yield the exact p-value when the data has ties: Home Public Questions Tags Users Companies Collectives ExploreCollectives Teams StackOverflowforTeams –Startcollaboratingandsharingorganizationalknowledge. CreateafreeTeam WhyTeams? Teams CreatefreeTeam Collectives™onStackOverflow Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost. LearnmoreaboutCollectives Teams Q&Aforwork Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch. LearnmoreaboutTeams ranksumtestinRvs.MATLAB:exactp-valuewhentiesarepresent AskQuestion Asked 7monthsago Modified 7monthsago Viewed 83times 0 New!Savequestionsoranswersandorganizeyourfavoritecontent.Learnmore. DearmastersofRandMATLAB! Asdocumented,theranksumtestinRcannotyieldtheexactp-valuewhenthedatahasties: x=c(1,1,100,1000,10000);y=c(2,20,20,2000,20000); result=wilcox.test(x,y,mu=0,paired=FALSE, conf.level=0.95,exact=TRUE,alternative='greater') Warningmessage: Inwilcox.test.default(x,y,mu=0,paired=FALSE,conf.level=0.95,: cannotcomputeexactp-valuewithties Result Wilcoxonrank-sumtestwithcontinuitycorrection data:xandy W=10,p-value=0.7358 alternativehypothesis:truelocationshiftisgreaterthan0 BUTMATLABDOESIT: x=[1,1,100,1000,10000]';y=[2,20,20,2000,20000]'; [p,h,stats]=ranksum(x,y,'alpha',0.05,'method','exact','tail','right') p=0.714285714285714 Iguess,MATLABdoesanillegalthing(pMATLAB=0.71,not0.74),BUTiwouldneedtoforceRtoyieldtheexactp-value(pEXACT=pMATLAB=0.71)fortestingpurposes. Thankyou:) rmatlab Share Improvethisquestion Follow editedMar19at14:03 Kat 10.6k22goldbadges1414silverbadges3838bronzebadges askedMar19at9:05 MichaelJachanMichaelJachan 122bronzebadges 2 MatlabandRbothadjustfortiesusingnormaldistribution,butexecutethisdifferently.ForMatlab,seeGibbonsandChakraborti(2010)&HollanderandWolfe(1999).ForR,seeBauer(1972).Neitheriswrong,it'sjustdifferentperspectivesofthesameproblem. – Kat Mar19at14:15 Thx,Kat!Isee,thereareseveralstrategies.ButthecoreofmyQis:CanigenerateRandMATLAB-commands,suchthatbothyieldthesameresults?BR,MJ:) – MichaelJachan Mar21at2:27 Addacomment | 0 Sortedby: Resettodefault Highestscore(default) Trending(recentvotescountmore) Datemodified(newestfirst) Datecreated(oldestfirst) Knowsomeonewhocananswer?Sharealinktothisquestionviaemail,Twitter,orFacebook. YourAnswer ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers. Draftsaved Draftdiscarded Signuporlogin SignupusingGoogle SignupusingFacebook SignupusingEmailandPassword Submit Postasaguest Name Email Required,butnevershown PostYourAnswer Discard Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy Browseotherquestionstaggedrmatlaboraskyourownquestion. TheOverflowBlog Privacy-friendlymachinelearningdatasets:syntheticdata Bewarethescammersposingastechrecruiters(Ep.497) FeaturedonMeta BookmarkshaveevolvedintoSaves Inboximprovements:markingnotificationsasread/unread,andafiltered... CollectivesUpdate:RecognizedMembers,Articles,andGitLab The[script]tagisbeingburninated StagingGroundWorkflow:CannedComments Related 0 ManualWilcoxonRank-SumTest 2 UseRtototesthypothesisofcorrelation=.5 1 wilcox.testdoesnotworkinshiny 0 HowtogettabulatedintervalofWilcoxon-Mann-Whitneyranksumtest 5 Differentp-valueinggplot2stat_compare_meansandwilcox.test 1 ErrorwhenusingtheBenjamini-HochbergfalsediscoveryrateinRafterWilcoxonRank 0 Select(dplyr)throwsobjecterrorinuser-definedfunctioncalls? 0 HowdoIfigureoutwhichmedianislargerusingwilcoxonranksumtest? HotNetworkQuestions Wouldcopper-basedbloodbemoreeffectiveatcarryingoxygenratherthaniron-based?Orwouldithinderthedeliveryofoxygen? Acollectionofshortstoriespossiblyfrom80s.Oneinvolvedamanwhocouldpassthroughwalls ShouldwetakeintoaccountscopechangestotheSprinttomeasuretheteamefficiency? Psalms2:7meaningbeforeJesus 2ddatasetascontour Whatisthe"YOULEDTHEMTOUS??!!!"plotdevicecalled? Whatcharacteristicsdoesmydeadlyriverneedsopeoplecan'tfindthebodiesofthosewhodrowninit? HowlongmustthehorizontalrunbetomakeanS-trapaP-trap? HowdoIunscrewthisscrewtodisassembleadresser? WhatshouldIdoifIhavesomeevidencepointingoutthattheresultspresentedinaconferencepapermightbefake? Whyscreendisplaysdeadpixelsat144Hzbutnotat60Hz? DoesWitherandBloomhealhappenatallifthetargethasnounspentHitDie? HowsooncouldtheUKseeageneralelection? HowdoImaintainquadsandshadingafterthisbevel? Howmuchlightwouldbereceivedonarogueplanetclosetothegalacticcenter? RotatinglineusingPyQGIS WhatisthisBeechcraftbonanzaA36wingfeature? ReducethesizeofthefilewhileIwriteanarraytoGeoTIFFusingPython Whyarephononsquantized? IsSATanexistentialquestion? Whydidtheystopaddingphysical"writeprotect"mechanism? Whenfittingalinearregressionmodel,isitalwaysrecommendedtoplottheresiduals? Howdoesthisswitchdebouncecircuitwork? Componentrequiresspecificvoltageandcurrentbutthemathdoesn'taddup morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. default Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings
延伸文章資訊
- 1秩和检验-matlab函数ranksum用法详解 - CSDN博客
data in x and y are samples from continuous distributions with equal medians. matlab调用方法: [p,h,st...
- 2ranksum (Statistics Toolbox)
ranksum. Wilcoxon rank sum test that two populations are identical ... p = ranksum(x,y,alpha) ret...
- 3rank-sum test - 順位和測驗 - 國家教育研究院雙語詞彙
公告日期: 104.11.09. 以rank-sum test 進行詞彙精確檢索結果. 出處/學術領域, 英文詞彙 ...
- 4Wilcoxon Rank Sum Test for Independent Samples
How to perform the Wilcoxon ranked sum non-parametric test for independent samples in Excel, a te...
- 5Rank Sum Test - an overview | ScienceDirect Topics
Wilcoxon rank-sum test is used to compare two independent samples, while Wilcoxon signed-rank tes...