资源描述:
《Bayesian computation with R-8.pdf》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、8ModelComparison8.1IntroductionInthischapter,weillustratetheuseofRtocomparemodelsfromaBayesianperspective.WeintroducethenotionofaBayesfactorinthesettingwhereoneiscomparingtwohypothesesaboutaparameter.Inthesettingwhereoneistestinghypothesesaboutapopulationmean,weillustratethecomputa
2、tionofBayesfactorsinboththeone-sidedandtwo-sidedsettings.WethengeneralizetothesettingwhereoneiscomparingtwoBayesianmodels,eachconsistingofachoiceofpriorandsamplingdensity.Inthiscase,theBayesfactoristheratioofthemarginaldensitiesforthetwomodels.WeillustrateBayesfactorcomputationsint
3、woexamples.Intheanalysisofhittingdataforabaseballplayer,onewishestocomparea“consistent”modelwitha“streaky”modelwheretheprobabilityofasuccessmaychangeoveraseason.Inthesecondapplication,weillustratethecomputationofBayesfactorsagainstindependenceinatwo-waycontingencytable.8.2Compariso
4、nofHypothesesTointroduceBayesianmeasuresofevidence,supposeoneobservesYfromasamplingdistributionf(y
5、θ)andonewishestotestthehypothesesH0:θ∈Θ0,H1:θ∈Θ1,whereΘ0andΘ1formapartitionoftheparameterspace.Ifoneassignsaproperpriordensityg(θ),thenonecanjudgethetwohypothesesaprioribythepriorodds
6、ratioπ0P(θ∈Θ0)Θ0g(θ)dθ==.π1P(θ∈Θ1)Θg(θ)dθ1J.Albert,BayesianComputationwithR,UseR,DOI10.1007/978-0-387-92298-08,©SpringerScience+BusinessMedia,LLC20091828ModelComparisonAfterdataY=yareobserved,one’sbeliefsabouttheparameterareupdatedbytheposteriordensityg(θ
7、y)∝L(θ)g(θ),whereL(θ)ist
8、helikelihoodfunction.One’snewbeliefsaboutthetwohy-pothesesaresummarizedbytheposterioroddsratiop0P(θ∈Θ0
9、y)Θ0g(θ
10、y)dθ==.p1P(θ∈Θ1
11、y)Θg(θ
12、y)dθ1TheBayesfactoristheratiooftheposterioroddstotheprioroddsofthehypothesesposterioroddsp0/p1BF==.prioroddsπ0/π1ThestatisticBFisameasureoftheevid
13、enceprovidedbythedatainsupportofthehypothesisH0.TheposteriorprobabilityofthehypothesisH0canbeexpressedasafunctionoftheBayesfactorandthepriorprobabilitiesofthehypothesesbyπ0BFp0=.π0BF+1−π08.3AOne-SidedTestofaNormalMeanInanexamplefromChapter14ofBerry(1996),theauthorwasinterestedindet
14、ermininghistrueweightfroma