Learn R Programming

tvReg (version 0.5.0)

bwCov: Covariance Bandwidth Calculation by Cross-Validation bwCov calculates a single bandwidth to estimate the time-varying variance- covariance matrix.

Description

Covariance Bandwidth Calculation by Cross-Validation bwCov calculates a single bandwidth to estimate the time-varying variance- covariance matrix.

Usage

bwCov(x, cv.block = 0, est = c("lc", "ll"), tkernel = c("Epa", "Gaussian"))

Arguments

x

A matrix or a data frame.

cv.block

A positive scalar with the size of the block in leave-one block-out cross-validation. By default 'cv.block=0' meaning leave-one-out cross-validation.

est

The nonparametric estimation method, one of "lc" (default) for linear constant or "ll" for local linear.

tkernel

The type of kernel used in the coefficients estimation method, one of Epanesnikov ("Epa") or "Gaussian".

Value

A scalar.

Examples

Run this code
# NOT RUN {
data(CEES)
## Using a shorter set for a quick example
mydata <- tail (CEES, 50)
bw.cov <- bwCov(mydata)
Sigma.hat <- tvCov(mydata, bw = bw.cov)

# }

Run the code above in your browser using DataLab