tojkd {panelhetero}R Documentation

The TOJ bias-corrected kernel density estimation

Description

The 'tojkd()' function enables to implement the TOJ bias-corrected kernel density estimation for the heterogeneous mean, the autocovariance, and the autocorrelation. The method is developed by Okui and Yanagi (2020). For more details, see the package vignette with 'vignette("panelhetero")'.

Usage

tojkd(
  data,
  acov_order = 0,
  acor_order = 1,
  mean_bw = NULL,
  acov_bw = NULL,
  acor_bw = NULL
)

Arguments

data

A matrix of panel data. Each row corresponds to individual time series.

acov_order

A non-negative integer of the order of autocovariance. Default is 0.

acor_order

A positive integer of the order of autocorrelation. Default is 1.

mean_bw

A scalar of bandwidth used for the estimation of the denisty of mean. Default is NULL, and the plug-in bandwidth is used.

acov_bw

A scalar of bandwidth used for the estimation of the denisty of autocovariance. Default is NULL, and the plug-in bandwidth is used.

acor_bw

A scalar of bandwidth used for the estimation of the denisty of autocorrelation. Default is NULL, and the plug-in bandwidth is used.

Value

A list that contains the following elements:

mean

A plot of the corresponding density

acov

A plot of the corresponding density

acor

A plot of the corresponding density

mean_func

A function that returns the corresponding density

acov_func

A function that returns the corresponding density

acor_func

A function that returns the corresponding density

bandwidth

A Vector of the bandwidths

quantity

A matrix of the estimated heterogeneous quantities

acov_order

The order of autocovariance

acor_order

The order of autocorrelation

N

The number of cross-sectional units

S

The length of time series

References

Okui, R. and Yanagi, T., 2020. Kernel estimation for panel data with heterogeneous dynamics. The Econometrics Journal, 23(1), pp.156-175.

Examples

data <- panelhetero::simulation(N = 300, S = 50)
panelhetero::tojkd(data = data)


[Package panelhetero version 1.0.1 Index]