Calculates the negative of log posterior, using the leave-one-out samples.
Usage
bbecost2(data_x, data_y, x, prior_st = 0.1)
Arguments
data_x
Regressors
data_y
Response variable
x
Log bandwidths of the regressors
prior_st
Tuning parameter of the prior following inverse gamma distribution
Value
Value of the cost function
Details
The default bandx_priors is the inverse gamma distribution. Assuming the error density is i.i.d and follows normal distribution,
the cost2 function is designed to calculate the variance parameter of the error density.
References
X. Zhang and R.D. Brooks and M.L. King (2009), A Bayesian approach to bandwidth selection for multivariate kernel regression with an application to state-price density estimation, Journal of Econometrics, 153, 21-32.