From peter.summers@ttu.edu Sat Mar 12 20:08:25 2011 From: Summers, Peter To: gretl-users@gretlml.univpm.it Subject: Re: [Gretl-users] Threshold VAR: Coding Help Date: Sat, 12 Mar 2011 19:04:27 -0600 Message-ID: <8885DA157278484489B1EBC8B8C043E3FDC8A13364@COTTUS.ttu.edu> In-Reply-To: AANLkTimjS4BFqw6p1vokbKXqpLkmUaYXCQZcOiJtnNLm@mail.gmail.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8087543376277713066==" --===============8087543376277713066== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable FWIW, in a univariate TAR model the data gets re-ordered by (say) ascending v= alues of the threshold variable, then separate regressions get run on the 2 s= ub-samples. Could this be done with an "msortby" command followed by smpl com= mands? PS ________________________________________ From: gretl-users-bounces(a)lists.wfu.edu [gretl-users-bounces(a)lists.wfu.ed= u] On Behalf Of Henrique Andrade [henrique.coelho(a)gmail.com] Sent: Saturday, March 12, 2011 6:48 PM To: Gretl list Subject: Re: [Gretl-users] Threshold VAR: Coding Help Em 12 de mar=C3=A7o de 2011 Allin escreveu: On Sat, 12 Mar 2011, Henrique Andrade wrote: > *Y(t) =3D X(t-1) + e1(t); if z(t-d)>=3Dtau* > *Y(t) =3D X(t-1) + e2(t); if z(t-d)=3D tau, otherwise 0. Dear Allin, I need that the errors (and variances) differ in each regime: Y_t =3D D1 + B1(L)Y_t + U1_t, if z(t-d) >=3D tau Y_t =3D D2 + B2(L)Y_t + U2_t, otherwise So I think I need to use the threshold values to build two data segments. To = do this I'm doing something close to your script: