生存分析代写 ST227代写 R语言代写 Survival Analysis代写
512ST227 Survival Analysis Project 生存分析代写 Instructions to candidates This paper contains four questions. Answer ALL FOUR. Question 1: 25 marks Question 2: 30 marks Question 3: 25 marks ...
View detailsSearch the whole station
统计计算方法代写 Question (7 pts) Recall the Beta distribution, which is defined for θ ∈ (0, 1) with parameters α and β, has a density proportional to:
Recall the Beta distribution, which is defined for θ ∈ (0, 1) with parameters α and β, has a density proportional to:
θα−1 (1 − θ)β−1
The Dirichlet distribution generalizes the the Beta distribution for k such θi values such that P ki=1 θk = 1.
Suppose that X1 counts the number observations of type 1, X2 counts the numbers of observations of type 2, and X3 counts the number of observations of type 3 in a sample (e.g., red, blue, and green cars observed on the highway). We will treat n = X1 + X2 + X3 as fixed, so that our data have a multinomial distribution, which generalizes the binomial distribution. As with the binomial distribution, we can notice that X3 = n − X1 − X2, and so is redundant.
The probability mass function for a multinomial distribution is proportional to
Consider the Bayesian model:
(θ1, θ2) ∼ Dirichlet(δ1, δ2, δ3)
(X1, X2) ∼ Multinomial(n, θ1, θ2)
Show that the posterior distribution π(θ1, θ2 | x1, x2) has a Dirichlet distribution with parameters (x1 + δ1, x2 + δ2, n − x1 − x2 + δ3). (Hint: find something that is proportional to the posterior distribution and argue that the only possible normalizing constant must lead to a Dirichlet distribution with the given parameters.)
Proof:
The posterior distribution of π(θ1, θ2 | x1, x2) can be expressed by:
Therefore the conditional distribution is still a Dirichlet distribution for θ1, θ2 and the parameter is (x1 + δ1, x2 + δ2, n − x1 − x2 + δ3)
Find the full conditional posteriors (up to a normalizing constant) for θ1 and θ2. Argue that
θ1 | θ2, x1, x2 ∼ (1 − θ2) Beta(x1 + δ1, n − x1 − x2 + δ3)
and
θ2 | θ1, x1, x2 ∼ (1 − θ1) Beta(x2 + δ2, n − x1 − x2 + δ3)
Hints:
• If X = aY , a > 0, and Y has density f(y), then X has density f(x/a)/a
• As we saw in class, be ruthless in dropping terms that don’t pertain to the main parameter as long as you can maintain proportionality. E.g.
So we can see that this is a scaled Beta distribution:
θ1 | θ2, x1, x2 ∼ (1 − θ2) Beta(x1 + δ1, n − x1 − x2 + δ3)
Similarly for θ2, we have:
θ2 | θ1, x1, x2 ∼ (1 − θ1) Beta(x2 + δ2, n − x1 − x2 + δ3)
A recent poll by Morning Consult/Politico asked voters their opinion on whether the Unite States Congress should raise the federal minimum wage.
x_1 <- 806 # Congress should raise to $15/hr x_2 <- 435 # Congress should not raise the minium wage x_3 <- 586 # Congress should raise to $11/hr n <- x_1 + x_2 + x_3
(I have excluded the 8% of the sample with no opinion) 统计计算方法代写
Modeling these results as multinomial, we will investigate the proportions of registered voters holding opinions about the federal minimum wage.
Use the result from part (b) to implement a Gibbs sampler for (θ1, θ2 θ3| x1, x2). Let δ1 = δ2 = δ3 = 1.
Create a chain of length 5000. Using the last 2000 iterations from the chain give estimates of θ1, θ2 and θ3. Also provide 95% credible intervals for each of the parameters (quantiles of the posterior marginal distributions).
Estimate the probability that the $15/hour wage is twice as popular no increase at all (i.e., P(θ1/θ2 > 2)).
Read the paper “Less than 2 degree C warming by 2100 unlikely.” Briefly summarize the results (question, data, analysis). Carefully, read the section “Methods: Model Estimation”. Explain how they used their posterior distribution to generate the predictions they used in the paper.
更多代写:CS加拿大网课代上 pte代考靠谱吗 英国宏观经济代上网课 留学研究生英文论文代写 留学生英文 presentation代写 report writing格式
合作平台:essay代写 论文代写 写手招聘 英国留学生代写
ST227 Survival Analysis Project 生存分析代写 Instructions to candidates This paper contains four questions. Answer ALL FOUR. Question 1: 25 marks Question 2: 30 marks Question 3: 25 marks ...
View detailsr语言考试和作业难度大吗?不会可以找r语言代写公司帮做吗? r语言代写 在国外留学生可以获得更好的教学条件和资源,并且掌握世界一线知识和技巧,特别是互联网行业。现在很多国外大学都纷纷开设相关专业供留...
View detailsStatistics II: Problem Sets 1 and 2 统计作业代写 Dear Students, Given the current state of affairs, in which we are facing a worldwide pandemic, the traditional methods of evaluation and Ins...
View detailsECON7310: Elements of Econometrics 计量经济作业代写 Instruction Answer all questions following a similar format of the answers to your tutorial questions. When you use R to conduct empirical ...
View details