STA6241 – STDA Homework 2 solved

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment

Description

5/5 - (5 votes)

1. In this problem we will carry out profile log-likelihood methods based on the provided
code (HW2.R). You may use the same simulation settings as in the provided code.
• Visualize profile log-likelihood function of ρ for [0.005, 0.5] interval.
• Obtain MLE for ρ, β, σ2
. (Hint: you may use optimize or optim function in R to
get MLE of ρ.)
2. STDA4 slide (page 7): Based on the provided code (STDA4.R),
• Clearly write down conditional distribution for β, τ, σ2
, ηobs. You no need to write
down for ρ because there is no closed form.
• clearly write down pseudo-code of the Metropolis-Gibbs sampler.
• Replicate the results: (1) Provide MCMC diagnostic plots for β, τ, σ2
. (2) Provide
prediction maps (both predictive posterior mean and standard deviation).
3. STDA4 slide (page 24): Implement Nimble-based MCMC code for Binomial data.
Report results for MCMC samples for β, ρ, σ2
(posterior mean, trace plots, highest
posterior density (hpd)).
1