hpjkd | R Documentation |
The 'hpjkd()' function enables to implement the HPJ 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")'.
hpjkd(
data,
acov_order = 0,
acor_order = 1,
mean_bw = NULL,
acov_bw = NULL,
acor_bw = NULL
)
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. |
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 |
Okui, R. and Yanagi, T., 2020. Kernel estimation for panel data with heterogeneous dynamics. The Econometrics Journal, 23(1), pp.156-175.
data <- panelhetero::simulation(N = 300, S = 50)
panelhetero::hpjkd(data = data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.