Title: | Inference on Many Jumps in Nonparametric Panel Regression Models |
---|---|
Description: | Provides uniform testing procedures for existence and heterogeneity of threshold effects in high-dimensional nonparametric panel regression models. The package accompanies the paper Chen, Keilbar, Su and Wang (2023) "Inference on many jumps in nonparametric panel regression models". arXiv preprint <doi:10.48550/arXiv.2312.01162>. |
Authors: | Georg Keilbar [aut, cre, cph], Likai Chen [ctb], Liangjun Su [ctb], Weining Wang [ctb] |
Maintainer: | Georg Keilbar <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.0 |
Built: | 2024-12-23 13:38:38 UTC |
Source: | CRAN |
Uniform kernel function
K(x)
K(x)
x |
a vector |
a vector of values
K(0)
K(0)
Simulate an MA infinity process with algrebraic decay
MAinf_normal(N, beta)
MAinf_normal(N, beta)
N |
sample size |
beta |
algebraic decay parameter |
simulated MA infinity process
x = MAinf_normal(100, 1.5)
x = MAinf_normal(100, 1.5)
Monte Carlo simulation to study the size and power properties of the uniform test for existence of threshold effects in the first derivative under known threshold locations. Provides the Monte Carlo distribution of the test statistic and empirical rejection probabilities at 10%, 5% and 1% level.
simulation.derivative( N, TL, p, M, epsilon = c("iid", "factor"), running = c("iid", "factor"), hetero = c(0, 1) )
simulation.derivative( N, TL, p, M, epsilon = c("iid", "factor"), running = c("iid", "factor"), hetero = c(0, 1) )
N |
cross-sectional dimension |
TL |
time series length |
p |
fraction of non-zero coefficients |
M |
number of Monte Carlo runs |
epsilon |
specification of error term. If |
running |
specification of running variable. If |
hetero |
if |
A list containing the value of the test statistic for each Monte Carlo run and the empirical rejection rate for a 10%, 5% and 1% confidence level.
result_derivative = simulation.derivative(10, 200, 0, 10, epsilon = "iid", running = "iid", hetero = 0)
result_derivative = simulation.derivative(10, 200, 0, 10, epsilon = "iid", running = "iid", hetero = 0)
Monte Carlo simulation to study the size and power properties of the uniform test for heterogeneity of threshold effects under known threshold locations. Provides the Monte Carlo distribution of the test statistic and empirical rejection probabilities at 10%, 5% and 1% level.
simulation.hetero( N, TL, p, M, epsilon = c("iid", "factor"), running = c("iid", "factor"), hetero = c(0, 1) )
simulation.hetero( N, TL, p, M, epsilon = c("iid", "factor"), running = c("iid", "factor"), hetero = c(0, 1) )
N |
cross-sectional dimension |
TL |
time series length |
p |
fraction of non-zero coefficients |
M |
number of Monte Carlo runs |
epsilon |
specification of error term. If |
running |
specification of running variable. If |
hetero |
if |
A list containing the value of the test statistic for each Monte Carlo run and the empirical rejection rate for a 10%, 5% and 1% confidence level.
result_hetero = simulation.hetero(10, 200, 0, 10, epsilon = "iid", running = "iid", hetero = 0)
result_hetero = simulation.hetero(10, 200, 0, 10, epsilon = "iid", running = "iid", hetero = 0)
Monte Carlo simulation to study the size and power properties of the pooled test for existence of threshold effects under unknown threshold locations. The pooled test can be based on a nonparametric regression model or a linear panel threshold regression model. Provides the Monte Carlo distribution of the test statistic and empirical rejection probabilities at 10%, 5% and 1% level.
simulation.pooled( N, TL, p, M, epsilon = c("iid", "factor"), running = c("iid", "factor"), hetero = c(0, 1), threshold = c("uniform", "exponential", "gaussian"), method = c("parametric", "nonparametric") )
simulation.pooled( N, TL, p, M, epsilon = c("iid", "factor"), running = c("iid", "factor"), hetero = c(0, 1), threshold = c("uniform", "exponential", "gaussian"), method = c("parametric", "nonparametric") )
N |
cross-sectional dimension |
TL |
time series length |
p |
fraction of non-zero coefficients |
M |
number of Monte Carlo runs |
epsilon |
specification of error term. If |
running |
specification of running variable. If |
hetero |
if |
threshold |
specifies the distribution for the non-zero threshold coefficients, possible values are |
method |
method of estimation ( |
A list containing the value of the test statistic for each Monte Carlo run and the empirical rejection rate for a 10%, 5% and 1% confidence level.
result_pooled = simulation.pooled(5, 400, 0, 10, epsilon = "iid", running = "iid", hetero = 0, threshold = "gaussian", method = "nonparametric")
result_pooled = simulation.pooled(5, 400, 0, 10, epsilon = "iid", running = "iid", hetero = 0, threshold = "gaussian", method = "nonparametric")
Monte Carlo simulation to study the size and power properties of the uniform test for existence of threshold effects under known threshold locations. Provides the Monte Carlo distribution of the test statistic and empirical rejection probabilities at 10%, 5% and 1% level.
simulation.threshold( N, TL, p, M, epsilon = c("iid", "factor"), running = c("iid", "factor"), hetero = c(0, 1) )
simulation.threshold( N, TL, p, M, epsilon = c("iid", "factor"), running = c("iid", "factor"), hetero = c(0, 1) )
N |
cross-sectional dimension |
TL |
time series length |
p |
fraction of non-zero coefficients |
M |
number of Monte Carlo runs |
epsilon |
specification of error term. If |
running |
specification of running variable. If |
hetero |
if |
A list containing the value of the test statistic for each Monte Carlo run and the empirical rejection rate for a 10%, 5% and 1% confidence level.
result_threshold = simulation.threshold(10, 200, 0, 10, epsilon = "iid", running = "iid", hetero = 0)
result_threshold = simulation.threshold(10, 200, 0, 10, epsilon = "iid", running = "iid", hetero = 0)
Monte Carlo simulation to study the size and power properties of the uniform test for existence of threshold effects under unknown threshold locations. Provides the Monte Carlo distribution of the test statistic and empirical rejection probabilities at 10%, 5% and 1% level.
simulation.unknown( N, TL, p, M, epsilon = c("iid", "factor"), running = c("iid", "factor"), hetero = c(0, 1), threshold = c("uniform", "exponential", "gaussian") )
simulation.unknown( N, TL, p, M, epsilon = c("iid", "factor"), running = c("iid", "factor"), hetero = c(0, 1), threshold = c("uniform", "exponential", "gaussian") )
N |
cross-sectional dimension |
TL |
time series length |
p |
fraction of non-zero coefficients |
M |
number of Monte Carlo runs |
epsilon |
specification of error term. If |
running |
specification of running variable. If |
hetero |
if |
threshold |
specifies the distribution for the non-zero threshold coefficients, possible values are |
A list containing the value of the test statistic for each Monte Carlo run and the empirical rejection rate for a 10%, 5% and 1% confidence level.
result_unknown = simulation.unknown(2, 800, 0, 10, epsilon = "iid", running = "iid", hetero = 0, threshold = "gaussian")
result_unknown = simulation.unknown(2, 800, 0, 10, epsilon = "iid", running = "iid", hetero = 0, threshold = "gaussian")
Uniform test for existence of threshold effects in the first derivative for nonparametric panel regressions. Both the known and unknown threshold location case are covered. Apart from the uniform test statistic and the corresponding p-value, a table for the results of the individual threshold estimates and test statistics is provided.
threshold.derivative.test( data, response, running, id, bw = NULL, C = 0, alpha = NULL, alternative = "two" )
threshold.derivative.test( data, response, running, id, bw = NULL, C = 0, alpha = NULL, alternative = "two" )
data |
a data frame containing the response, running and id variables |
response |
name of the dependent variable (aka response variable) |
running |
name of the running variable (aka forcing variable) |
id |
name of the id variable |
bw |
an optional scalar bandwidth parameter for the local linear estimation. If not specified, the bandwidth
is selected by the command |
C |
a scalar value for the true threshold location (for the known case) or a grid of candidate threshold locations (for the unknown case) |
alpha |
specifies a threshold to determine which and how many individual-specific threshold effects and test statistics are displayed in the output table. Only individuals which are significant at the alpha confidence level are selected. |
alternative |
specifies whether we consider a two-sided alternative (default) or left-/right-sided alternative. |
A list containing:
I_hat |
the value of the uniform test statistic |
p_value |
the corresponding p-value |
N |
the cross-sectional dimension |
Critical_values |
critical values at 10%, 5%, 1%, and 0.1% confidence level |
Table |
a table displaying the estimation result for a selection of individuals, including the id variable, the threshold location, the estimated coefficient, the estimated standard error, and the individual test statistic. |
threshold.example()
, rdrobust::rdbwselect()
.
d = threshold.example(10, 200, 0.1, 2) threshold.derivative.test(data = d, response = "y", running = "x", id = "id", C = 0)
d = threshold.example(10, 200, 0.1, 2) threshold.derivative.test(data = d, response = "y", running = "x", id = "id", C = 0)
Simulate an example data frame
threshold.example(N, TL, p, gamma)
threshold.example(N, TL, p, gamma)
N |
cross-sectional dimension |
TL |
time series length |
p |
fraction of non-zero coefficients |
gamma |
value of non-zero coefficients |
simulated data frame
d = threshold.example(10, 200, 0.1, 2)
d = threshold.example(10, 200, 0.1, 2)
Uniform test for heterogeneity of threshold effects in a nonparametric panel regression under known threshold locations. Apart from the uniform test statistic and the corresponding p-value, a table for the results of the individual threshold estimates and test statistics is provided.
threshold.heterogeneity.test( data, response, running, id, bw = NULL, c = 0, alpha = NULL, alternative = "two", use.median = FALSE )
threshold.heterogeneity.test( data, response, running, id, bw = NULL, c = 0, alpha = NULL, alternative = "two", use.median = FALSE )
data |
a data frame containing the response, running and id variables |
response |
name of the dependent variable (aka response variable) |
running |
name of the running variable (aka forcing variable) |
id |
name of the id variable |
bw |
an optional scalar bandwidth parameter for the local linear estimation. If not specified, the bandwidth
is selected by the command |
c |
a scalar value for the true threshold location |
alpha |
specifies a threshold to determine which and how many individual-specific threshold effects and test statistics are displayed in the output table. Only individuals which are significant at the alpha confidence level are selected. |
alternative |
specifies whether we consider a two-sided alternative (default) or left-/right-sided alternative. |
use.median |
if |
A list containing:
Q_hat |
the value of the uniform test statistic |
p_value |
the corresponding p-value |
N |
the cross-sectional dimension |
Critical_values |
critical values at 10%, 5%, 1%, and 0.1% confidence level |
Table |
a table displaying the estimation result for a selection of individuals, including the id variable, the threshold location, the estimated coefficient, the estimated standard error, and the individual test statistic. |
threshold.example()
, rdrobust::rdbwselect()
.
d = threshold.example(10, 200, 0.1, 2) threshold.heterogeneity.test(data = d, response = "y", running = "x", id = "id", c = 0)
d = threshold.example(10, 200, 0.1, 2) threshold.heterogeneity.test(data = d, response = "y", running = "x", id = "id", c = 0)
Uniform test for existence of threshold effects in a nonparametric panel regression. Both the known and unknown threshold location case are covered. Apart from the uniform test statistic and the corresponding p-value, a table for the results of the individual threshold estimates and test statistics is provided.
threshold.test( data, response, running, id, bw = NULL, C = 0, alpha = NULL, alternative = "two" )
threshold.test( data, response, running, id, bw = NULL, C = 0, alpha = NULL, alternative = "two" )
data |
a data frame containing the response, running and id variables |
response |
name of the dependent variable (aka response variable) |
running |
name of the running variable (aka forcing variable) |
id |
name of the id variable |
bw |
an optional scalar bandwidth parameter for the local linear estimation. If not specified, the bandwidth
is selected by the command |
C |
a scalar value for the true threshold location (for the known case) or a grid of candidate threshold locations (for the unknown case) |
alpha |
specifies a threshold to determine which and how many individual-specific threshold effects and test statistics are displayed in the output table. Only individuals which are significant at the alpha confidence level are selected. |
alternative |
specifies whether we consider a two-sided alternative (default) or left-/right-sided alternative. |
A list containing:
I_hat |
the value of the uniform test statistic |
p_value |
the corresponding p-value |
N |
the cross-sectional dimension |
Critical_values |
critical values at 10%, 5%, 1%, and 0.1% confidence level |
Table |
a table displaying the estimation result for a selection of individuals, including the id variable, the threshold location, the estimated coefficient, the estimated standard error, and the individual test statistic. |
threshold.example()
, rdrobust::rdbwselect()
.
d = threshold.example(10, 200, 0.1, 2) threshold.test(data = d, response = "y", running = "x", id = "id", C = 0)
d = threshold.example(10, 200, 0.1, 2) threshold.test(data = d, response = "y", running = "x", id = "id", C = 0)