Homework 6 (due 5 Nov in class)

(modified from exercise 5.7 of Hierarchical Modeling and Analysis for Spatial Data)

The real estate data set consists of information regarding 70 sales of single-family homes in Baton Rouge, LA, during the month of June 1989.

  1. Obtain the empirical variogram of the logarithm of selling prices.
  2. Fit a standard regression model to the logarithm of selling price using all explanatory variables other than location.
  3. Obtain the empirical variogram of the residuals to the fit above.
  4. Perform a fully Bayesian analysis using an exponential spatial correlation function. Use a flat prior for the regression coefficients, inverse gamma priors for the variance components, and a Unif(0,10) prior on the range parameter.
  5. Provide a predictive distribution for the actual selling price for a home at location (long=-91.1174, lat=30.506) that has 938 sqft of living area, 332 sqft of other area, 25 years old with 3 bedrooms and 1 bathroom (no half baths).

Homework 5 (due 22 Oct in class)

  1. Find the nugget, sill, and range (or effective range) for the linear, spherical, exponential, and Gaussian covariance function.
  2. Plot the variograms for the linear, spherical, exponential, and Gaussian s using the same value for the nugget, sill, and range (or effective range).
  3. Use Brook's Lemma to find the joint distribution for the conditional distributions X|Y~ N(pY,1-p2 ) and Y|X~N(pX,1-p2 ).

Homework 4 (due 15 Oct in class)

  1. Find the stationary distribution for an autoregressive process of order 1.
  2. Perform a Bayesian analysis of this data set, temperature measurements 25cm below the surface on an experimental plot in Wyoming. Here is some code to get you started:
d = read.csv("dlm-data.csv")
d$date = as.Date(as.character(d$date), format="%m/%d/%y")

y = d$EHSR.25cm.T
y_tmp = y
y_tmp[1180] = mean(y[c(1179,1181)])
n = nrow(d)
de = decompose(ts(y_tmp, start=d$date[1], end=d$date[n], freq=24))
plot(de)

Homework 3 (due 24 Sep in class)

  1. Verify equation 2.10 in Yu and Meng.
  2. Consider the following Gibbs sampler: X|Y~ N(pY,1-p2 ) and Y|X~N(pX,1-p2 ) for a known 0<p<1.
    • What is the stationary distribution for this Gibbs sampler?
    • Derive the transition kernel for moving from X to X', similar to equation 2.17 in Yu and Meng.
    • Verify that this transition kernel preserves the stationary distribution for X using the technique below equation 2.17 in Yu and Meng.
  3. Recreate the comparison between Hamiltonian Monte Carlo and Metropolis (or even Gibbs sampling) in the bivariate normal example used in MCMC using Hamiltonian Dynamics. Feel free to use this HMC function, but otherwise you should write your own code.

Homework 2 (due 17 Sep in class)

This homework covers data augmentation approaches for probit and logistic regression.

  1. Show that the following models are equivalent:
    • y~Ber(p), p = \Phi(Xb) where \Phi is the cdf of a standard normal
    • y=I(Z>0), Z ~ N(Xb,1)
  2. Run an MCMC for the model below (you can use BUGS/JAGS) and describe (using a plot?) how non-identifiability affects the posterior.
    • y=I(Z>a), Z~N(Xb,1) where X includes an intercept and a single explanatory variable and a and b are unknown parameters
  3. Verify (or find the typo for) the likelihood for beta at the bottom of page 7 of Polson et al.

Homework 1 (due 10 Sep in class)

This homework covers two topics: Bayesian hypothesis testing (question 1) and regularized regression (questions 2-4). For the regularized regression problems, we assume the data are of the form y=Xb+e where e~N(0,s2 ).

  1. Derive equation (4) in Sharpening Ockham's Razor on a Bayesian Strop.
  2. Show that independent normal priors on regression components lead to the ridge estimator on page 5 of Ridge Regression in Practice.
  3. Show that independent Laplace priors on regression coefficients lead to the LASSO estimator on page 1 of Bayesian LASSO.
  4. Derive the form of the prior distribution for the elastic net estimator.