Learn R Programming

bbemkr (version 1.2)

bbecost2: Negative of log posterior associated with the error variance

Description

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

Usage

bbecost2(data_x, data_y, x, kerntype = c("Gaussian", "Epanechnikov", 
         "Quartic", "Triweight", "Triangular", "Uniform"), 
         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.
prior_st
A tuning parameter of the prior associated with the error variance, which follows inverse gamma distribution

Value

  • Value of the cost function

Details

The default bandx_priors is the inverse gamma distribution. Assuming the error density is independent and identically distribution and follows a normal distribution, the function is designed to calculate the negative of log posterior associated with the error variance component.

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, bbecost