Generate GIRF for a TVAR with external threshold variable

231 views
Skip to first unread message

marion...@hotmail.de

unread,
Aug 7, 2020, 11:44:08 AM8/7/20
to tsdyn
Hi,

I have estimated a TVAR with an external threshold variable (specified with the thVar element of the TVAR function). 
However, the GIRF function doesn't seem to work if my threshold variable is external to the model. I get the following error, which I think is linked to the TVAR.sim not supporting external threshold variables...
 
>GIRF(TVAR2000.res)
 Error in if (round(z2[i - thDelay], round.dig) <= Thresh) { :   missing value where TRUE/FALSE needed 

Is there any way to generate girf with external threshold variables?

Thanks,
Marion
Message has been deleted

Luan

unread,
Aug 10, 2020, 4:16:10 PM8/10/20
to tsdyn
Hello, Marion!

I've recently found this great package and have been experimenting with it, so I do not know much about it. But are you using the development version of the package? I remember getting the same error when I tried to use the standalone version of this function. I was able to run the GIRF function with the development version of the package, although I can't seem to distinguish the GIRF's between the regimes (in fact, if anyone knows how to do this, I would be very grateful).
Just in case, the latest development version of the package can be installed with following code:

library(remotes)
install_github("MatthieuStigler/tsDyn/tsDyn", ref = "Dev94", force = T)

Hope I could help somehow!

Regards,
Luan

Matthieu S

unread,
Aug 10, 2020, 8:57:41 PM8/10/20
to ts...@googlegroups.com, marion...@hotmail.de
Hi Marion and Luan

Thanks Luan for providing help! Marion, Luan is correct that you should actually look at the development version of the package (which I still haven't pushed to cran, sorry about that!). If your problem persists, please open an issue on githuib (https://github.com/MatthieuStigler/tsDyn/issues) and provide a reproducible example (https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)

Best

Matthieu

--
You received this message because you are subscribed to the Google Groups "tsdyn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tsdyn+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tsdyn/e1a71bd3-fc75-4620-974d-ca98193db223o%40googlegroups.com.

Marion Amiot

unread,
Aug 11, 2020, 12:28:18 PM8/11/20
to Matthieu S, ts...@googlegroups.com
Thanks both,

Yes it does work with the development version!
Marion

De : Matthieu S <matthieu...@gmail.com>
Envoyé : mardi 11 août 2020 00:57
À : ts...@googlegroups.com <ts...@googlegroups.com>; marion...@hotmail.de <marion...@hotmail.de>
Objet : Re: [tsDyn] Re: Generate GIRF for a TVAR with external threshold variable
 

giovanna ciaffi

unread,
Oct 2, 2022, 10:05:52 AM10/2/22
to tsdyn
Hi all, 
I'm trying to estimate a TVAR with external variable. I'm be able to estimate the model e the related GIRF, but i'm not able to obtain state-dependent GIRF. 

 Does anyone know how to do this? 
Thank you in advance
Giovanna 


Reply all
Reply to author
Forward
0 new messages