Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/cost2_gaussian.R
Calculates the negative of log posterior for the normal error variance, using the leave-one-out cross validated samples.
1 | cost2_gaussian(x, data_x, data_y, prior_st)
|
x |
Log of square bandwidths |
data_x |
Regressors |
data_y |
Response variable |
prior_st |
Another tuning parameter of the prior of error variance, following inverse gamma distribution |
The prior of normal error variance follows an inverse-gamma distribution with hyperparameter prior_st = 1
.
Value of the cost function
Han Lin Shang
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.
1 2 | x = log(nrr(data_x, FALSE)^2)
cost2_gaussian(x, data_x = data_x, data_y = data_ynorm, prior_st = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.