版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、统计计算题目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算法更新推导过程:计算E步的Q函数:(3)计算M步的Q函数求极值过程:(i)由于要使Q函数达到最大,同时参数必须满足,运用拉格朗日乘法可得从而有;(ii)由于要使Q函数达到最大,即对求偏导。 从而有; 从而有;即得证。算法:(1)首先将混合正态模型的参数初始化为;(2)E步:通过混合正态分布进行随机模拟得到n个样本,计算完全数据对数似然关于数据的期望值,对数似然函数的期望(3)M步:最优化期望值,即通过迭代找到的最大值;即题目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. 从两个正态总体里分别以0.7和0.3的概率产生100个随机模拟样本2.选取一个建议分布,从建议分布中抽取一个候选值。3.计算Metropolis-Hastings比率(通常实际中用贝叶斯推断得到的一个比率。4.以等于R的概率接受,如果接受,则,如果没有接受,则。5.增加t,重复上述过程,直到收敛。题目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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 铜仁地区江口县2026年中考三模数学试题含解析
- 2026年一级造价师之建设工程技术与计量(交通)试卷B卷及答案
- 2026年上海市知识产权保护中心下半年公开招聘考试备考试题及答案
- 财务总监招聘笔试题与参考答案(某大型国企)2026年
- 2026年加氢工艺证考试题库及答案
- 2026年职业技能鉴定考试(考评员)经典试题及答案
- 深入分析2026年语文考试试题及答案
- 2026年邮政系统招聘考试邮政机务员考试近5年真题集锦(频考类试题)及答案
- 电子商务平台建设合作协议三篇
- 医院网络安全及诈骗防范知识考试试题及答案
- 服装设计师作品组绩效衡量表
- 河南省部分高中2026-2027学年高二上学期9月联考数学试卷(含答案)
- 2025“外研社国才杯”“理解当代中国”外语能力综合能力赛项(英语组)模拟样卷
- 2026年河北高考历史真题(试卷+解析)
- 人教版2026-2027学年高中物理必修第三册第9章-13章期中测试卷(含解析)
- 高考语文复习文言文主观简答题课件
- 紫外可见分光光度法-完整版课件
- 定密责任人培训
- 取水工程或者设施验收报告
- 2025年一等奖课件:故乡的记忆与变迁
- 《神州租车简介》课件
评论
0/150
提交评论