Search found 64 matches

by Jarenka
5 years ago
Forum: Syntax
Topic: searching string in set
Replies: 11
Views: 10636

Re: searching string in set

I have a different problem. I have the following code: set Tid /2000*2020/; singleton set FinalYear /2017/; singleton set StatBank /2017/; if (FinalYear < StatBank, loop( ...); ); I have an error when starting "if" condition. I would like to "compare" the years (elements) of thes...
by Jarenka
5 years ago
Forum: Archive Google Group
Topic: Looping over file names
Replies: 29
Views: 30923

Re: Looping over file names

Dear, How to modify below code for i.tl in such a way that it does forecasting for (i.tl+1) ? I would like to predict "qpa" for 2018, having value for 2017, and so on... until predicted year 2020. file test / test.txt /; put test; set i / 2017*2020/; loop(i, put test put 'qpa(KVAR,AKM,BKM,...
by Jarenka
5 years ago
Forum: Archive Google Group
Topic: Looping over file names
Replies: 29
Views: 30923

Re: Looping over file names

Hi Renger,

I have managed to do it for all years: 2008 to 2017 and for two *.txt files.

THANK YOU FOR YOUR HELP !!

Irena
by Jarenka
5 years ago
Forum: Archive Google Group
Topic: Looping over file names
Replies: 29
Views: 30923

Re: Looping over file names

Hi Renger,

Thank you for your help!

I have implemented it and did some small changes.
It compiles correctly, but I do not receive values for "qpatpae". "putclose" option does it only for 2010, so I deleted it.
See my code and results in the attachments.
by Jarenka
5 years ago
Forum: Archive Google Group
Topic: Looping over file names
Replies: 29
Views: 30923

Re: Looping over file names

Hi, I was trying to understand the looping over the files names, but your conversation simply doesn't say anything to me. My problem is the following: I would like to loop over the years, which are part of the names in the parameters. Here in the attachment is an example for 2008. I would like to lo...
by Jarenka
5 years ago
Forum: Tools
Topic: SAS files into GAMS
Replies: 11
Views: 10742

Re: SAS files into GAMS

Guys, I think I did it. I am sorry for posting so many posts, but I feel so excited by it. Anyway, on the foto1 there is my last R-code that reads id *.dat file (shown in my previous post). In GAMS program you have specify the code in foto2. Be careful about the following things in R: - when you spe...
by Jarenka
5 years ago
Forum: Tools
Topic: SAS files into GAMS
Replies: 11
Views: 10742

Re: SAS files into GAMS

For those who are working with R and GAMS, this could be helpful. I think I corrected above problem. In attachment there is a new R-code, which works in GAMS. In foto1 there is output in GAMS - a table "alldata" with dimensions and variables. In foto2 there is corrected R-code for this. No...
by Jarenka
5 years ago
Forum: Tools
Topic: SAS files into GAMS
Replies: 11
Views: 10742

Re: SAS files into GAMS

And foto4 attached below:
by Jarenka
5 years ago
Forum: Tools
Topic: SAS files into GAMS
Replies: 11
Views: 10742

Re: SAS files into GAMS

So far is good. Firstly, I had to install gdxrrw package by using *.zip file, which fortunately was under GAMS folder :-) - and that was very good, because we work on the research machines (Windows 32-bit) that do not have access to the Internet due to confidentiality. In the attachment, at the bott...
by Jarenka
5 years ago
Forum: Tools
Topic: SAS files into GAMS
Replies: 11
Views: 10742

Re: SAS files into GAMS

Yes, it works! Thank you! I am attaching the "screen-cut" from my program. On the left hand side there is my code with specified variables. On the right hand side there is a screen-display from R-program (the first data-file with dimensions and variables). You can see which parameters I wa...