threshold.test {hdthreshold} | R Documentation |
Uniform test for existence of threshold effects
Description
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.
Usage
threshold.test(
data,
response,
running,
id,
bw = NULL,
C = 0,
alpha = NULL,
alternative = "two"
)
Arguments
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. |
Value
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. |
See Also
threshold.example()
, rdrobust::rdbwselect()
.
Examples
d = threshold.example(10, 200, 0.1, 2)
threshold.test(data = d, response = "y", running = "x", id = "id", C = 0)