Problem 2. Data were collected on two input variables ($x_{i1}, x_{i2}$) and a response variable ($y_i$). The data are given in problem2.csv. The investigator would like to fit the following model to the data:
$y_i = \beta_0 + \beta_1 x_{i1} + \beta_2 x_{i2} + \epsilon_i$,
where $\epsilon_i \sim N(0, \sigma_i^2)$ for $i = 1, \dots, 1000$ and
$\sigma_i^2 = \exp\{\alpha_0 + \alpha_1 x_{i1} + \alpha_2 x_{i2}\}$.
Assume noninformative priors for all the six parameters. Generate an MCMC sample of size 10,000 with additional 1,000 burn-in using BUGS or PyMC or another PPL (for PyMC, using the pm.sample tune parameter for the 1,000 burned samples is acceptable).
1. Find the posterior mean and 95% credible intervals of the six parameters.
2. Which variables appear to be significant for the mean and variance?
3. Find the point values of the input variables that will minimize the variance (plug in the posterior means of $\alpha_i$'s in the variance formula and minimize).