Deleting Used Time Series

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
Finn Weiss
Posts: 15
Joined: Fri Apr 24, 2015 8:48 am

Deleting Used Time Series

Unread post by Finn Weiss »

Dear Rats Comunity,

i have following problem. I load data on a daily frequncy for every day between 01.01.2001 and 31.12.2013. I make a loop overall days and for every day there ist a series which is called for example: value20010101 , value20010102 and so on.
The Problem is, that i am running out of memory. So i want to delete the series from the memory when i go to the next step of the loop. I tried it with the release instruction but that failed. This is my code:
Optionsscheine.RPF
(3.79 KiB) Downloaded 942 times
Thanks for your Help
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Deleting Used Time Series

Unread post by TomDoan »

What is it that you're trying to do? This is apparently reading a great deal of data (all the contents of a particular RATS format file over a very long stretch of time), and then you seem to be getting rid of the data that you just read.

data(format=rats) 1960:1:1 2074:12:31

Based upon what I see, it looks like you want to do something like what's described in

https://estima.com/docs/RATS 9 Users Guide.pdf#page=501

reusing a block of series with each trip through.
Finn Weiss
Posts: 15
Joined: Fri Apr 24, 2015 8:48 am

Re: Deleting Used Time Series

Unread post by Finn Weiss »

Yes something like that. Thanks to your help i can now load every series alone.
Still one question is left.
How can i erase the series out of my memory at the end of the loop?
I have the problem that all series are kept in the memory and so ther eis not enough left to run the file.
Finn Weiss
Posts: 15
Joined: Fri Apr 24, 2015 8:48 am

Re: Deleting Used Time Series

Unread post by Finn Weiss »

Something like the comand end(reset), but only for the variables which have been loaden with the comand open.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Deleting Used Time Series

Unread post by TomDoan »

With your workspace size, each series is taking up roughly 250Kb. At a 2Gb total workspace for standard WinRATS, that's room for about 8000 series. Are you actually going through that many? It looks like the RELEASE isn't handling series correctly (as you note). However, you typically don't need to use that because things like VECT[SERIES] and RECT[SERIES] and the like are available to reuse series if you're doing this type of looping operation where a series is only used temporarily.
Finn Weiss
Posts: 15
Joined: Fri Apr 24, 2015 8:48 am

Re: Deleting Used Time Series

Unread post by Finn Weiss »

Okay. Is there maybe a function where can i load for example variable x and rename x to series y during the loading prozess. So that only y is saved into the working space?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Deleting Used Time Series

Unread post by TomDoan »

That's what the LABELS instruction is used for in Section 15.3 in the User's Guide. It's the label of the series (not its name in the symbol table) that's used in pulling the data off the data file.
Post Reply