Description Usage Arguments Details Value Author(s) References See Also Examples
Computes a test for a threshold in linear regression under homoskedasticity.
1 2 3 4 5 6 7 8 9 10 11 12 |
df |
Data frame. |
yi |
Integer or character; index or column name of dependent (y)
variable in |
xi |
Integer or character vector; indexes or column names of
independent (x) variables in |
qi |
Integer or character; index or column name of threshold (q)
variable in |
var.names |
Character vector; variable names with
|
trim_per |
Numeric; percentage of sample to trim from ends.
Default is |
rep |
Integer; number of bootstrap replications. Default is
|
cr |
Numeric; confidence level used to plot the critical value in the
graph. It is not used elsewhere in the analysis. Default is
|
graph |
Logical; graph indicator.
Set |
quick |
Integer; indicator of method used for bootstrap.
Set |
Do not include a constant in the independent variables; the function automatically adds an intercept to the regression.
The function stores the sequential design matrices in order to
speed up the bootstrap computations. It is possible that if your
dataset is very large, this will exceed your computer RAM memory.
If so, function will crash, and the message
Error: allocMatrix: too many elements specified
will be displayed. If more RAM is not available, switch to
quick = 0
. The switch quick = 0
requires the bootstrap
to re-calculate the design matrices for each bootstrap replication,
which requires less memory, but somewhat more computer time.
A list with components:
f_test
the value of Maximal (Quandt) F-statistic.
p_value
the bootstrap p-value.
Marcel Kremer, marcel.kremer@uni-due.de
Bruce E. Hansen, behansen@wisc.edu
Hansen, B. E. (2000). Sample splitting and threshold estimation. Econometrica, 68(3):575–603. https://doi.org/10.1111/1468-0262.00124. https://www.ssc.wisc.edu/~bhansen/papers/ecnmt_00.pdf.
thr_test_het
for threshold test under heteroskedasticity,
thr_est
for threshold estimation.
1 2 3 4 5 6 | ## Performs part of the empirical work reported in Hansen (2000)
data <- dur_john
output <- thr_test_hom(data, 1, 2:5, 6)
output$f_test
output$p_value
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.