For questions about EViews Add-ins available from the EViews Add-ins webpage. Note each add-in available on our webpage will have its own individual thread.

Moderators: EViews Gareth, EViews Moderator, EViews Esther

Posts: 1
Joined: Fri Nov 10, 2017 7:30 am

Re: rtadf

Postby prashant » Fri Nov 10, 2017 6:11 pm

Hi Itamar,
When I run the program having the simulation I have found that the EViews giving message !TRW not defined and is illegal command.Hrnce, I cannot complete the procedure. I am attaching the output for reference.
Looking forward for your reply,

Itamar wrote:Ok, following Gareth's advice, I added a command option for the rtadf add in (in a quick and dirty way but it seems to work). Note that this is still experimental and it might have some bugs I missed. For it to work, you will need to replace the current rtadf.prg and rtadfsim.prg files which are in your EViews Addins\RTadf library with the attached new files.

Here is a short guide (Later on I will update the user guide):


model={1,2,3,4}; where 1=adf, 2=radf, 3=sadf, 4=gsadf
trim={}; is the window size (in fraction trems or in no. of observations)

const/trend/none; specification of the deterministic terms in the unit root test equation

info={fixed,aic,hqc,sic,maic,mhqc,msic}; information criteria for the lag length of the unit root test equation
lag={}; maximal lag length for the test equation (if "fixed" is chosen, this will be the fixed lag length)

sim; preform MC simulation for the critical values (this will prompt the simulation dialog once the calculation of the statistic is over)
graph; this will generate a graph of the results
print; this will print the spool with the result and the graph


The command,

y.rtadf(model=3, trim=0.3, trend, info=fixed, lag=1, graph, print)

will run a SADF test on y where the initial window size is set to 0.3 with a test equation specified with a constant and a trend and with one fixed lag. In addition, it will show a spool which holds the test statistic and a graph.

One caveat I have here is that, at least for now, the command cannot perform the test and the simulation automatically. However, if you wishe to preform the same test to several series having the same sample size and the same window, all you need to do is to do the simulation once, keep the critical values, and then run the same command for the remaining series (with the "sim" option shut off) via a loop.

I'll be happy to get your comments!

Enjoy bubbling...

PS, the addin now enables the user to specify the deterministic terms of the test equation, both in the test dialog and in the simulation dialog. In addition, the add in now calculates the p-value of the test statistic (according to the simulated distribution of the test statistic), but this is still an experimental feature.
rtadf.jpg (66.7 KiB) Viewed 22688 times

Posts: 1
Joined: Sun Feb 11, 2018 3:20 am

Re: rtadf

Postby groodt » Sun Feb 11, 2018 1:09 pm

I do get the same error as jchomicki, where a warning Message pops up that TStat_max is not defined.

Has there been any fix yet I didn't see?

Posts: 25
Joined: Wed Mar 12, 2014 12:31 pm

Re: rtadf

Postby Itamar » Sun Mar 25, 2018 12:23 am

Dear Rtadf users,

Please download the lates version of the add-in (http://www.eviews.com/Addins/rtadf.aipz) and try again. If you still find bugs, please email me at:

caspi.itamar [at] gmail.com


Posts: 3
Joined: Mon May 15, 2017 8:53 pm

Re: rtadf

Postby jchomicki » Thu Apr 12, 2018 8:12 pm

Thank you Itamar, i will try it and let you know!

Posts: 25
Joined: Wed Mar 12, 2014 12:31 pm

Re: rtadf

Postby Itamar » Mon May 21, 2018 12:05 pm

Dear rtadf users,

Xiaohui (Sharon) Wu, an rtadf user, has finally found the source for the annoying "tstat_max" bug.

I see several posts on the Eviews forum mentioned the "TStat_max_max is not defined" error, which I encountered myself too. After looking at the codes, I find the Matlab function says "function [ tstat_max, radf_cv ] = SIM_RADF( obs, win, rep, d, eta ,beta )", while in the RTADFSIM_MATLAB file, it says "xrun "[tstat_max sadf_cv]=SIM_SADF(T,t1,rep,delta,eta,beta,adfspec);"". So, there is one more input in the .prg file than in the .m file, namely the "adfspec". When I delete "adfspec" in the .prg file, everything works fine.

The latest version of the addin (https://www.jstatsoft.org/article/view/v081c01) solves this issue by adding the "flag" term to the Matlab SIM_*ADF function. However, the version that appeared in the EViews addin repository was outdated and contained that annoying bug. Thanks to Sharon and Gareth, the latest version of the addin has been uploaded to the EViews repository and should work just fine.

Please let me know about any new bugs you find.


Posts: 3
Joined: Mon May 15, 2017 8:53 pm

Re: rtadf

Postby jchomicki » Mon May 21, 2018 5:26 pm

Just tried it. Worked perfectly fine! Great job!

Posts: 1
Joined: Wed Jun 19, 2019 12:45 pm

Re: rtadf

Postby Pascai » Mon Jul 08, 2019 1:41 am

Hey altogether,

I am having a question regarding the results of the following GSADF-Test.

As you can see in the attached immage the timeseries I want to test is declining (therefore I asume as a non expert in this field that my autoregressive parameter is probably smaler then 1). Does anybody know why the test is confirming me the alternative hypotheses that the autoregressive paramter is taller then 1and implies an mildly explosive root from the year 2012 on?

I set the parameters n=d=1

Any help is very much appreciated.

KR Pascal
mannheim.PNG (45.1 KiB) Viewed 20795 times

Posts: 1
Joined: Wed Apr 15, 2020 4:11 am

Re: rtadf

Postby BMD7 » Wed Apr 15, 2020 8:43 am

Hi all,

I've just installed the rtadf add-in however when I attempt to run any of the 4 tests from the Proc of a time series I get the error message: "An unnamed object cannot be converted to a string." I have tried using different series however always get the same error message and all series I am using are named. I am quite new to Eviews so my knowledge is rather limited. Is anyone able to help with this issue?

Thanks in advance!

Posts: 1
Joined: Fri Dec 01, 2023 9:12 am

Re: rtadf

Postby madeinacme » Fri Dec 01, 2023 9:40 am

this will be the silliest question on this topic but i hava to ask. i'm trying to work with gsadf test (with monte carlo simulation), i forgot to freeze the output but saved the workfile. how can i open the output page&graph again? (it took 2 days to finish the simulation)

Return to “Add-in Support”

Who is online

Users browsing this forum: No registered users and 4 guests