版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
1、統(tǒng)計計算題目4.2. Epidemiologists are interested in studying the sexual behavior of individuals at risk for HIV infection. Suppose 1500 gay men were surveyed and each was asked how many risky sexual encounters he had in the previous 30 days. Letdenote the number of respondents reporting i encounters, for i
2、=1,.,16. Table 4.2 summarizes the responses. These data are poorly fitted by a Poisson model. It is more realistic to assume that the respondents comprise three groups. First, there is a group of people who,for whatever reason, report zero risky encounters even if this is not true. Suppose a respond
3、ent has probabilityof belonging to this group. With probability, a respondent belongs to a second group representing typical behavior. Such people respond truthfully, and their numbers of risky encounters are assumed to follow a Poisson() distribution. Finally, with probability , a respondent belong
4、s to a high-risk group. Such people respond truthfully, and their numbers of risky encounters are assumed to follow a Poisson() distribution. The parameters in the model areand.At theth iteration of EM, we useto denote the current parameter values. The likelihood of the observed data is given by , w
5、here for i=1,.,16. The observed data are. The complete data may be construed to be , and ,where ,denotes the number of respondents in group reporting risky encounters and and correspond to the zero, typical,and promiscuous groups, respectively. Thus,andfor i=1,.,16.Let Definefor i=0,.,16. These corr
6、espond to probabilities that respondents with i risky encounters belong to the various groups.a. Show that the EM algorithm provides the following updates:b. Estimate the parameters of the model, using the observed data.c. Estimate the standard errors and pairwise correlations of your parameter esti
7、mates, using any available method.解:(1)則有其中表示不同組,表示危險性行為。即得證;(2) 下證EM算法更新推導(dǎo)過程:計算E步的Q函數(shù):(3)計算M步的Q函數(shù)求極值過程:(i)由于要使Q函數(shù)達到最大,同時參數(shù)必須滿足,運用拉格朗日乘法可得從而有;(ii)由于要使Q函數(shù)達到最大,即對求偏導(dǎo)。 從而有; 從而有;即得證。算法:(1)首先將混合正態(tài)模型的參數(shù)初始化為;(2)E步:通過混合正態(tài)分布進行隨機模擬得到n個樣本,計算完全數(shù)據(jù)對數(shù)似然關(guān)于數(shù)據(jù)的期望值,對數(shù)似然函數(shù)的期望(3)M步:最優(yōu)化期望值,即通過迭代找到的最大值;即題目7.2 Simulating f
8、rom the mixture distribution in Equation (7.6) is straightforward see part (a) of Problem 7.1. However, using the MetropolisHastings algorithm to simulate realizations from this distribution is useful for exploring the role of the proposal distribution.a. Implement a MetropolisHastings algorithm to
9、simulate from Equation (7.6) with ,usingas the proposal distribution. For each of three starting values,x(0) =0,7,and 15, run the chain for 10,000 iterations. Plot the sample path of the output from each chain. If only one of the sample paths was available, what would you conclude about the chain? F
10、or each of the simulations, create a histogram of the realizations with the true density superimposed on the histogram. Based on your output from all three chains, what can you say about the behavior of the chain?b. Now change the proposal distribution to improve the convergence properties of the ch
11、ain. Using the new proposal distribution, repeat part (a).算法:1. 從兩個正態(tài)總體里分別以0.7和0.3的概率產(chǎn)生100個隨機模擬樣本2.選取一個建議分布,從建議分布中抽取一個候選值。3.計算Metropolis-Hastings比率(通常實際中用貝葉斯推斷得到的一個比率。4.以等于R的概率接受,如果接受,則,如果沒有接受,則。5.增加t,重復(fù)上述過程,直到收斂。題目7.5 A clinical trial was conducted to determine whether a hormone treatment benefits
12、women who were treated previously for breast cancer. Each subject entered the clinical trial when she had a recurrence. She was then treated by irradiation and assigned to either a hormone therapy group or a control group. The observation of interest is the time until a second recurrence, which may
13、be assumed to follow an exponential distribution with parameter(hormone therapy group) or(control group). Many of the women did not have a second recurrence before the clinical trial was concluded, so that their recurrence times are censored. In Table 7.2, a censoring time M means that a woman was o
14、bserved for M months and did not have a recurrence during that time period, so that her recurrence time is known to exceed M months. For example, 15 women who received the hormone treatment suffered recurrences, and the total of their recurrence times is 280 months. Letbe the data for theth person i
15、n the hormone group, whereis the time andequals 1 ifis a recurrence time and 0 if a censored time. The data for the control group can be written similarly. The likelihood is then. Youve been hired by the drug company to analyze their data. They want to know if the hormone treatment works, so the tas
16、k is to find the marginal posterior distribution ofusing the Gibbs sampler. In a Bayesian analysis of these data, use the conjugate prior Physicians who have worked extensively with this hormone treatment have indicatedthat reasonable values for the hyperparameters are (a, b, c, d) = (3, 1, 60, 120)
17、.a. Summarize and plot the data as appropriate.b. Derive the conditional distributions necessary to implement the Gibbs sampler.c. Program and run your Gibbs sampler. Use a suite of convergence diagnostics to evaluate the convergence and mixing of your sampler. Interpret the diagnostics.d.Compute su
18、mmary statistics of the estimated joint posterior distribution, including marginal means, standard deviations, and 95% probability intervals for each parameter. Make a table of these results.e. Create a graph which shows the prior and estimated posterior distribution forsuperimposed on the same scal
19、e.f. Interpret your results for the drug company. Specifically, what does your estimate ofmean for the clinical trial? Are the recurrence times for the hormone group significantly different from those for the control group?g. A common criticism of Bayesian analyses is that the results are highly dependent on the priors. Investigate this issue by repeating your Gibbs sampler for values of the hyperparameters that are half and double the original hyperparameter values.Provide a table of summary statistics to compare your resul
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 新員工培訓(xùn)獎懲管理辦法
- 綜合專項應(yīng)急演練培訓(xùn)
- 預(yù)防普通感冒的措施
- 自制英語課件教學(xué)課件
- 神秘的宇宙培訓(xùn)宣傳
- 第四章 曲線運動-教材實驗5 探究平拋運動的特點 2025年高考物理基礎(chǔ)專項復(fù)習(xí)
- 防臺防汛安全教育培訓(xùn)
- 繁育員的年終總結(jié)
- 深度學(xué)習(xí)及自動駕駛應(yīng)用 課件 第1、2章 汽車自動駕駛技術(shù)概述、深度學(xué)習(xí)基礎(chǔ)
- 花樣跳繩說課稿小學(xué)
- JJG 2023-1989壓力計量器具
- GB/T 7251.6-2015低壓成套開關(guān)設(shè)備和控制設(shè)備第6部分:母線干線系統(tǒng)(母線槽)
- 《計算機操作系統(tǒng)》湯小丹
- GB/T 18656-2002工業(yè)系統(tǒng)、裝置與設(shè)備以及工業(yè)產(chǎn)品系統(tǒng)內(nèi)端子的標(biāo)識
- 自制溫度計課件
- 小學(xué)英語課堂教學(xué)中創(chuàng)新思維能力的培養(yǎng)策略和方法
- 中藥飲片管理規(guī)范
- 全產(chǎn)業(yè)鏈運營模式課件
- 三級安全教育試題(機動車駕駛員 )
- 第一課 同住地球村 復(fù)習(xí)課件-部編版道德與法治九年級下冊
- 主題班會課件-同學(xué)喜歡我-通用版
評論
0/150
提交評論