Fractional Cointegration LM test Robinson 1994
Fractional Cointegration LM test Robinson 1994
Dear all,
Does anyone have the procedure code for Robinsons LM test in his 1994 paper " Efficient tests of nonstationary hypotheses"
Thanks very much,
Does anyone have the procedure code for Robinsons LM test in his 1994 paper " Efficient tests of nonstationary hypotheses"
Thanks very much,
Re: Fractional Cointegration LM test Robinson 1994
This looks like it does the Q=0 test for first differencing.
Code: Select all
*
* Robinson, JASA, December 1994
* Series B (BoxJenkins IBM stock data)
*
open data "ibmstock.txt"
data(format=free,org=var) 1 369 ibmstock
*
* Make the hypothesized difference of the data (1L)^1 to create Utilde
*
diff ibmstock / dseries
*
* Compute the variance of Utilde
*
stats dseries
compute sigsq=%variance
*
compute endl=369,startl=2
*
compute n = endlstartl+1
*
freq 1 n
rtoc startl endl 1
# dseries
# 1
*
* Compute the periodogram and the psi function
*
fft 1
cmult(scale=1.0/(2*%pi*n)) 1 1
set pgram 1 n = %real(%z(t,1))
set psi 1 n = log(2 * abs(sin(%pi*(t1)/n)))
*
* Compute the sums of lambda to make small atilde and big Atilde.
* Avoid the undefined value for psi at t=1 (zero frequency)
*
sstats 2 n 2.0*psi^2>>bigA
sstats 2 n 2.0*%pi*psi*pgram>>smallA
compute bigA=bigA/n,smallA=smallA/n
*
* This is closed form value rather than the value approximated off the sum
*
*compute bigA=%pi^2/6.0
*
* This is the chisquared statistic
*
compute r=n*smalla^2/(bigA*sigsq^2)
*
* This is the onetailed equivalent
*
compute onetail=sqrt(n)*smalla/(sqrt(bigA)*sigsq)
disp "ChiSquared" r "Onetail" onetail
 Attachments

 ibmstock.txt
 Data file
 (1.47 KiB) Downloaded 1385 times
Re: Fractional Cointegration LM test Robinson 1994
Dear Tom,
Thank you very much for the fast reply!
Now I just have to figure out how to include intercept and intercept and trend when computing.
I am assuming this code above is for no regressors? Or have I read it incorrectly.
Once again thank you!
Thank you very much for the fast reply!
Now I just have to figure out how to include intercept and intercept and trend when computing.
I am assuming this code above is for no regressors? Or have I read it incorrectly.
Once again thank you!
Re: Fractional Cointegration LM test Robinson 1994
The regression variant is y(t)=z(t)beta+x(t), phi(L)x(t)=u(t), where phi(L) is typically (1L)^(1+theta) so you're testing a fractional alternative to first differencing. Under the null, that would mean estimating
(1L)y=((1L)z(t))beta+u(t)
If z is 1 and t, you would first difference the data and regress on a constant only, since the 1 drops out when differenced and the t converts to a constant.
(1L)y=((1L)z(t))beta+u(t)
If z is 1 and t, you would first difference the data and regress on a constant only, since the 1 drops out when differenced and the t converts to a constant.
Re: Fractional Cointegration LM test Robinson 1994
Once again thank you for the quick reply.
I am looking to present 3 cases  no regressors, constant, constant and trend for different values of the differencing parameter.
With the code you have shown me, I am unsure how to adjust for the other 2 cases.
Your help is much appreciated, thank you.
I am looking to present 3 cases  no regressors, constant, constant and trend for different values of the differencing parameter.
With the code you have shown me, I am unsure how to adjust for the other 2 cases.
Your help is much appreciated, thank you.
Re: Fractional Cointegration LM test Robinson 1994
Just detrend the data first, and fractionally difference the results using DIFF with the D option with D=.5 or whatever is your differencing parameter under the null. Fractional differencing can't eliminate a trend, so you have to get it out of the data first.
Re: Fractional Cointegration LM test Robinson 1994
Dear Tom,
Could you provide a rats code for replicating the results in TESTING THE ORDER OF INTEGRATION OF THE U.K. UNEMPLOYMENT  Gil Alana or guide me how to do it in rats to replicate the results so I can do it on myself for the data I have.
Thanks,
Fondly,
Marinko
Could you provide a rats code for replicating the results in TESTING THE ORDER OF INTEGRATION OF THE U.K. UNEMPLOYMENT  Gil Alana or guide me how to do it in rats to replicate the results so I can do it on myself for the data I have.
Thanks,
Fondly,
Marinko
Re: Fractional Cointegration LM test Robinson 1994
Dear Tom,
Marinkos request would also be of significant use.
In addition when I said 3 cases,I meant on u(t), so u(t) would have no constant no trend, constant, constant and trend. Like in the paper Marinko states.
So given a process how would I consider these cases.Sorry if this is just what you have stated , I just obtained odd results before.
Thank you,
Marinkos request would also be of significant use.
In addition when I said 3 cases,I meant on u(t), so u(t) would have no constant no trend, constant, constant and trend. Like in the paper Marinko states.
So given a process how would I consider these cases.Sorry if this is just what you have stated , I just obtained odd results before.
Thank you,
Re: Fractional Cointegration LM test Robinson 1994
If you read the paper, in all cases, you simply apply the difference operator under the null to the dependent variable and the regressors, run a regression to get the residuals, and apply the calculation in my original post to the resulting series, with the residuals replacing my "dseries". If d=1, the constant would disappear and the trend would downgrade to a constant. If d<1, the constant would remain as is. I have no idea how Prof. GilAlana handles the model with constant and trend with a hypothesized d<1 since a fractional difference applied to a trend (theoretically) generates a nonconvergent sum.
Re: Fractional Cointegration LM test Robinson 1994
Dear Tom,
Could you provide above mentioned Robinson(1994) LM test with autocorrelated Bloomfield errors (q=1, q=2, q=3, etc)...
I appreciate your responce.
Thank you in advance
Could you provide above mentioned Robinson(1994) LM test with autocorrelated Bloomfield errors (q=1, q=2, q=3, etc)...
I appreciate your responce.
Thank you in advance