Page 1 of 1

reading data from excel database

Posted: Wed Jul 31, 2013 1:31 pm
by Gilbril
Dear Tom, i do want to read data from an excel database directly into rats. The database is in monthly frequency and updated daily. The months are indicated "m1.12" for january 2012. I tried to read the data into rats by setting dateformant='m'+"m.yy" in the datainstruction. But unfortunately this does not work. In this database the serieslabels are in the most left column A and it is followed by six columns of descriptions. How can I skip these columns between labels and data? And the last question : Is there any fucntion which counts the nuber of series loaded into the current rats file?

Thanks in advance!

Re: reading data from excel database

Posted: Wed Jul 31, 2013 5:30 pm
by TomDoan
If you could attach a copy or e-mail to support@estima.com, it would be easier than trying to construct an example. However, the only way to skip the explanatory columns is to skip the label column as well using the LEFT=... option and then label the series yourself. Unfortunately, that won't help if the number or location of series changes from download to download.

At any time

compute nseries=%size(%slike("*"))

will give the number of series.

Re: reading data from excel database

Posted: Mon May 12, 2014 3:01 pm
by pitsikiou
Dear Mr. Tom,
i am a new user of the rats programme and i am trying to employ the egarch spillover according to the Koutmos' code you have attached at another discussion.
I am trying without result to insert the data into the rats from an excel sheet.
The data are monthly and i follow the routine: data (other formats)--> and there i set the taget dates (monthly, periods per year, linear).
Is there smthg that i do wrong? do i have to name the excel file with a specific name so as to see the data in the programme?
Thank you very much in advance

Re: reading data from excel database

Posted: Mon May 12, 2014 4:36 pm
by TomDoan
pitsikiou wrote:Dear Mr. Tom,
i am a new user of the rats programme and i am trying to employ the egarch spillover according to the Koutmos' code you have attached at another discussion.
I am trying without result to insert the data into the rats from an excel sheet.
The data are monthly and i follow the routine: data (other formats)--> and there i set the taget dates (monthly, periods per year, linear).
Is there smthg that i do wrong? do i have to name the excel file with a specific name so as to see the data in the programme?
Thank you very much in advance
It sounds like you've gotten into the wizard OK. What happens when you do that? It should generate a DATA instruction which reads the data.

Re: reading data from excel database

Posted: Mon May 12, 2014 4:48 pm
by pitsikiou
Thank you for your reply.
After i insert the data i copy the Koutmos' code - which i have changed according to my data, but there is no response.
So i thought maybe the data where not inserted correctly.
Also, i saved the rats when inserting the data and closed the programme but when i reopened it, the data did not exist in the rats file i had saved.
Do i have to load them every time i use them?
Thank you for your time and sorry for the questions but i am trying to learn the programme. :oops:
Thank you

Re: reading data from excel database

Posted: Mon May 12, 2014 5:25 pm
by TomDoan
As it describes in the "Introduction" in Section 1.4.2, the first thing you should do on reading in a data set for the first time is to check it by doing either a TABLE instruction or getting a list of series and doing the statistics on them. Assuming that the data came in OK, the problem is then with the adaptation of the Koutmos program to your data, which is very different situation.

No. You should only need to do the Wizard once---it will create the set of instructions which will be needed for future runs of the program. Just make sure you save the program with the generated instructions.

Re: reading data from excel database

Posted: Mon May 12, 2014 5:47 pm
by pitsikiou
Thank you very much.
I will take a carefull look again at the code.