Dear Gretl users,

I have to test the linearity vs non-lineraity of my system. To doing that, I'm using the Rao test, as in Terasvirta (2013).

 

I have collected my RSS0 and RSS1 (matrices of RSS) from my system of equations.

I define some parameters to compute the F Rao test

scalar s=((cdZ^2*p^2-4)/(p^2+cdZ^2-5))^1/2

scalar a=126-cdX-(1/2)*(p+cdZ+1)

scalar z1=((a*s-(1/2)*cdZ*p+1)/(cdZ*p))

scalar z2=(a*s-(1/2)*cdZ*p+1)

 

Frao test is specified as following:

 

scalar Frao=(((abs(RSS1)/abs(RSS2))^1/s)-1)*z1

 

Then, I'm in trouble with the commands because,

 

Problem 1: Frao is a matrix yet!

 

Problem 2: Then, I have to compute an F test with F(12,412). I think is it not correct the following command:

 

genr pv= pvalue(X,df,Frao)

 

Qestions: Can somebody understand why Frao is a matrix yet? How I can perform an F test con pvalue?  

 

Thanks a lot

Valentina