Docsity

Multivariate Normal Analysis, Full Conditionals - Homework 6 | STAT 564, Assignments of Statistics

Toggle sidebar
bg1
564-2007
Homework 6
Assigned 05/09/07
Due 05/16/07
1. Full conditionals: Let {y1, . . . , yn|µ,Σ}be i.i.d. multivariate normal(µ,Σ) and let (µ|Σ) ∼multivariate
normal(µ0,Σ/κ0).
(a) Derive p(µ|y1, . . . , yn,Σ).
(*) Derive p(Σ|y1, . . . , yn).
(*) Derive p(yj|y−j,µ,Σ).
2. Multivariate normal analysis: Obtain a multivariate dataset with at least 30 samples
and at least 4 variables per sample (do not worry just yet if your data are not normally
distributed). Alternatively, obtain the dataset in the Hw6 directory. Perform an empirical
Bayesian analysis on your data using the conjugate normal model with
•µ0=¯y, κ0= 1;
•S0=ˆ
Cov(y1, . . . , yn), ν0=p+ 2.
(a) Make a pairs-plot of the variables and describe in words.
(b) Obtain 95% posterior confidence intervals for the components of µ. Compare to the
standard univariate frequentist confidence interval for each variable.
(c) Randomly fill the data matrix with 10% NAs using the following procedure:
set.seed(1)
O<-matrix(rbinom(n*p,1,.9),n,p)
Y[O==0]<-NA
Impute the value of the missing data using MCMC, plot the true values against the
posterior mean imputed value and compute P R = [Pi:oi,j=0 (yi,j −¯yi,j)2]/[Pi:oi,j =0 (yi,j −
ˆyi,j)2] for each j∈ {1, . . . , p}and interpret. Which variables can you impute well, and
why?
(*) Using the data without missing values, fit a regression function for each variable, obtain
a predicted value for each missing value and compute the P R-score for this imputation
procedure.
(d) Make a plot showing a 95% CI for each correlation as well as the correlation-based
regression parameters. Interpret your results.
(e) Load in the R-package sbgcop and fit a semiparametric Gaussian copula model. Obtain
a plot corresponding to the one in part (d) and discuss any differences.
1

Partial preview of the text

Download Multivariate Normal Analysis, Full Conditionals - Homework 6 | STAT 564 and more Assignments Statistics in PDF only on Docsity!

Homework 6 Assigned 05/09/ Due 05/16/

  1. Full conditionals: Let {y 1 ,... , yn|μ, Σ} be i.i.d. multivariate normal(μ, Σ) and let (μ|Σ) ∼multivariate normal(μ 0 , Σ/κ 0 ).

(a) Derive p(μ|y 1 ,... , yn, Σ). () Derive p(Σ|y 1 ,... , yn). () Derive p(yj |y−j , μ, Σ).

  1. Multivariate normal analysis: Obtain a multivariate dataset with at least 30 samples and at least 4 variables per sample (do not worry just yet if your data are not normally distributed). Alternatively, obtain the dataset in the Hw6 directory. Perform an empirical Bayesian analysis on your data using the conjugate normal model with - μ 0 = y¯, κ 0 = 1; - S 0 = Cov(ˆ y 1 ,... , yn), ν 0 = p + 2.

(a) Make a pairs-plot of the variables and describe in words. (b) Obtain 95% posterior confidence intervals for the components of μ. Compare to the standard univariate frequentist confidence interval for each variable. (c) Randomly fill the data matrix with 10% NAs using the following procedure: set.seed(1) O<-matrix(rbinom(n*p,1,.9),n,p) Y[O==0]<-NA Impute the value of the missing data using MCMC, plot the true values against the posterior mean imputed value and compute P R = [

i:oi,j =0(yi,j^ −^ y¯i,j^ )

2 ]/[∑

i:oi,j =0(yi,j^ − y ˆi,j )^2 ] for each j ∈ { 1 ,... , p} and interpret. Which variables can you impute well, and why? (*) Using the data without missing values, fit a regression function for each variable, obtain a predicted value for each missing value and compute the P R-score for this imputation procedure. (d) Make a plot showing a 95% CI for each correlation as well as the correlation-based regression parameters. Interpret your results. (e) Load in the R-package sbgcop and fit a semiparametric Gaussian copula model. Obtain a plot corresponding to the one in part (d) and discuss any differences.