I will carefully check and revert to you, sir.

Thanks.

On Wed, 21 Jun 2023, 11:51 am Sven Schreiber, <sven.schreiber@fu-berlin.de> wrote:
Am 15.06.2023 um 10:32 schrieb Olasehinde Timmy:
Dear Professors,

Please, I have been trying to use a loop in finding an average point that gives a threshold effect on the dependent variable giving a criterion (such as lowest AIC or BIC). 

Y = a + bX + c(X-X*) + e
Where Y is the dependent variable,  and X is the independent variable.  

Please, if anyone has ever done something like appreciate it if the code can be shared. 

Hi,

I'm attaching code that I wrote some years ago, implementing (parts of) "Estimation and model selection based inference in single and multiple threshold models", Jesus Gonzalo, Jean-Yves Pitarakis, Journal of Econometrics 110 (2002) 319–352.

In that setup there's a separately chosen threshold series which --given the estimated threshold value(s)-- determines in each observation the regime where you currently are. If I understand your setup correctly, you want the single series X to serve both as the regressor and at the same time as the threshold series. In principle you would then have to call my function like this:

estim_thresh( Y, X, X, 1)

But I haven't tested if this case actually works.

I guess this stuff could also be turned into a function package -- if someone wants to learn and practice how to do it, be my guest and go ahead, I have no problem that this code is used.

While digging around my harddisk, I also found some prototype code for the Hansen (2000) approach, but that doesn't appear to be ready to run...

Hope this helps

Sven

_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/