Learn R Programming

bbemkr (version 1.2)

bbecost: Negative of log posterior associated with the bandwidths

Description

Calculates the negative of log posterior, using the leave-one-out samples.

Usage

bbecost(data_x, data_y, x, kerntype = c("Gaussian", "Epanechnikov", 
        "Quartic", "Triweight", "Triangular", "Uniform"), 
        bandx_priors, prior_p = 2, prior_st = 0.1)

Arguments

data_x
Regressors
data_y
Response variable
x
Log bandwidths of the regressors
kerntype
Type of kernel function. By default, Gaussian kernel is used
bandx_priors
Prior information of the bandwidths
prior_p
A tuning parameter of the prior of error variance, following inverse gamma distribution
prior_st
Another tuning parameter of the prior of error variance, following inverse gamma distribution

Value

  • Value of the cost function

Details

The default bandx_priors is the inverse gamma distribution. However, Cauchy prior can also be used which achieve similar results.

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.

See Also

np_gibbs, bbecost2