EBC 2043

Introduction to Software in Econometrics1样本外模型比较

yi =Xiβ+εi

i
iid〜N（0，σ2
）是误差，β是系数的k×1向量。

2

◦选择一个数据集，并应用具有多个解释变量的线性回归。
◦为模型选择两个不同的先验。解释选择背后的直觉

◦将数据拆分为估计和保留样本。
◦用两个先验估计线性回归模型。请注意，您可能需要

◦获得保留样本数据点的预测。
◦将样本外结果与不同先验结果进行比较。哪个先验会更好

2贝叶斯LASSO应用

◦选择适合线性回归模型的数据，并至少提供3个解释性数据

The linear regression model is given by:
y = X β + ε,
where y is the n×1 vector of dependent variable, X is an n×K matrix of explanatory
variables and ε ∼ N (0, σ2
I), where I indicates the identity matrix. Write down the
log-likelihood of this model.
Perform the remaining analysis for two priors:
(i) p1(β, σ2
) ∝
1
σ2
, corresponding to the flat prior.
(ii) p2(β, σ2
) ∝
1
σ2 ×
QK
k=1
λ
2

σ2
e
−λ|βk|/

σ2
◦ Create two functions to calculate the (log-)prior density for the above priors.
◦ Apply the Importance Sampling or Metropolis Hastings algorithm to obtain posterior results for the two priors separately. Clearly explain the candidate distribution
you choose.
◦ Compare the posterior results of β, σ2 obtained under the two priors. Consider
reporting the posterior means, variances or quantiles of interest.
◦ What do you conclude in terms of the relation between X and y variables? Does
the LASSO prior indeed shrink the parameter estimates?
◦ Plot the parameter draws for the elements of β. Comment on the convergence of
your simulation algorithm in both cases. Do you need to trim these draws? Do you
need to ‘burn-in’ part of the draws?
◦ How does the choice of λ effect your results?
References
Park, Trevor, and Casella, George (2008). The Bayesian LASSO. Journal of the American
Statistical Association 103, 681-686.