Thanks for sharing your output - some comments...

Am 08.04.2025 um 19:02 schrieb Andreas Zervas:
Test of Null of No Threshold Against Alternative of Threshold
Under Maintained Assumption of Homoskedastic Errors

Number of Bootstrap Replications: 1000
Trimming percentage: 0.150000

Threshold Estimate: 0.160979
 (18 % of obs in 1st regime)
LM-test for no threshold: 25.684802
Bootstrap p-value: 0.009000

OK, so nominally the absence of a threshold effect is rejected.

However,


  Heterosked. test p-val = 0.000971344
... your assumption of homoskedasticity above does not seem to be warranted, so the nominal threshold test result may be dubious. (And so could be the implied threshold estimate from this approach.)

*************************************************************
Threshold Estimation, dependent variable: d_EA_nfc_td

Threshold Variable: test_var
Threshold Estimate = 0.528682    90% CI: [0.528682, 0.528682]

This confidence interval with length zero seems weird. I guess with a finite set of potential threshold values it could happen in theory, but still; also your variable seems more or less continuous, right? I will try to take a look what's happening in the code, but if you could share your dataset (off-list if you like) that might be helpful.



Regime 2: test_var > 0.528682
...
  Observations = 9
  Degrees of Freedom = 3

Hm, obviously very few obs left in that regime, 9/301 = 3%. Not sure why Hansen didn't implement or require any trimming for the estimation routine (as opposed to the testing routine). So basically the H_thresh_test function is prevented from entering that parameter region by the trimming constraint. This of course is another (not previously mentioned) reason why the estimates differ.

cheers

sven