## Fractional Cointegration- LM test Robinson 1994

If you are seeking RATS code for implementing a particular technique or replicating results from a paper, post your request here. Be sure to include complete citations for any papers or books.

### 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,
arvo

Posts: 4
Joined: Tue Jul 10, 2012 2:22 am

### 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 (Box-Jenkins IBM stock data)*open data "ibm-stock.txt"data(format=free,org=var) 1 369 ibmstock** Make the hypothesized difference of the data (1-L)^1 to create U-tilde*diff ibmstock / dseries** Compute the variance of U-tilde*stats dseriescompute sigsq=%variance*compute endl=369,startl=2*compute n = endl-startl+1*freq 1 nrtoc startl endl 1# dseries# 1** Compute the periodogram and the psi function*fft 1cmult(scale=1.0/(2*%pi*n)) 1 1set pgram 1 n = %real(%z(t,1))set psi   1 n = log(2 * abs(sin(-%pi*(t-1)/n)))** Compute the sums of lambda to make small a-tilde and big A-tilde.* Avoid the undefined value for psi at t=1 (zero frequency)*sstats 2 n  2.0*psi^2>>bigAsstats 2 n -2.0*%pi*psi*pgram>>smallAcompute 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 chi-squared statistic*compute r=n*smalla^2/(bigA*sigsq^2)** This is the one-tailed equivalent*compute onetail=sqrt(n)*smalla/(sqrt(bigA)*sigsq)disp "Chi-Squared" r "One-tail" onetail`
Attachments ibm-stock.txt
Data file
TomDoan

Posts: 7385
Joined: Wed Nov 01, 2006 5:36 pm

### 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!
arvo

Posts: 4
Joined: Tue Jul 10, 2012 2:22 am

### 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 (1-L)^(1+theta) so you're testing a fractional alternative to first differencing. Under the null, that would mean estimating

(1-L)y=((1-L)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.
TomDoan

Posts: 7385
Joined: Wed Nov 01, 2006 5:36 pm

### 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.
arvo

Posts: 4
Joined: Tue Jul 10, 2012 2:22 am

### 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.
TomDoan

Posts: 7385
Joined: Wed Nov 01, 2006 5:36 pm

### 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
mskare69

Posts: 27
Joined: Tue May 10, 2011 3:35 pm

### 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,
arvo

Posts: 4
Joined: Tue Jul 10, 2012 2:22 am

### 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. Gil-Alana handles the model with constant and trend with a hypothesized d<1 since a fractional difference applied to a trend (theoretically) generates a non-convergent sum.
TomDoan

Posts: 7385
Joined: Wed Nov 01, 2006 5:36 pm

### 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)...