bootstrap_F1: Bootstrap test for threshold effect following Hansen (1999,...

bootstrap_F1R Documentation

Bootstrap test for threshold effect following Hansen (1999, JOE)

Description

Bootstrap test for threshold effect following Hansen (1999, JOE)

Usage

bootstrap_F1(
  X,
  Y,
  n_bootstrap = 500,
  q_lower = 0.05,
  q_upper = 0.95,
  n_grid = 180
)

Arguments

X

Panel data for x. Assumes that each row is an individual and each column is a time period.

Y

Panel data for y. Assumes that each row is an individual and each column is a time period.

n_bootstrap

Number of bootstrap draws

q_lower

Quantile of x above which we will search for the threshold

q_upper

Quantile of of x below which we will search for the threshold

n_grid

Number of grid points between q_lower and q_lower over which we will search for the the threshold

Value

List with bootstrap results:

  • gamma_hat Estimated threshold location

  • gamma_seq Grid of values considered for threshold location

  • S0 Sum of squared residuals for restricted model with no threshold

  • coef0 Estimated regression coefficients for restricted model with no

  • e_tilde Residuals from the restricted model with no threshold threshold

  • e_gamma_hat Residuals for threshold model with gamma set equal to gamma_hat

  • S1_gamma_hat Sum of squared residuals for threshold model with gamma set equal to gamma_hat

  • S1 Vector corresponding to gamma_seq. Each element is the sum of squared residuals for a thresdhold model with that particular value of gamma.

  • F1 Value of the F-test statistic for the input dataset

  • F1_boot Vector of values for F-test statistic in each of the bootstrap samples

  • pvalue Bootstrap p-value for test of the null hypothesis that there is no threshold, calculated from F1 and F1_boot

  • n_i Number of individuals in the panel

  • n_T Number of time periods in the panel

Examples

test_data <- dgp_threshold()
results <- bootstrap_F1(test_data$X, test_data$Y)

fditraglia/forcedMigration documentation built on July 16, 2022, 12:33 p.m.