Using Variables Rather than Strings in X13 function

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

kszynkar
Posts: 45
Joined: Tue Feb 02, 2016 1:15 am
Location: Switzerland

Using Variables Rather than Strings in X13 function

Postby kszynkar » Mon Feb 22, 2016 5:14 am

Hi,

I'm using some logic to determine the start and end date of a number of series I'm putting through the X13 model. When I try to use the following code though :

Code: Select all

string range="1983.Feb, 2013.Dec" temp.x13(save="d10 d12 d11 d13", outtype="ao", outspan=range, arimasmpl="1983M02 2013M12") @reg(regs="easter[1],") @x11(mode=add)
I get this error message:
File contains invalid text C:\Users\kszynkar\AppData\ev_temp\EVX13TMP.ERR in "DO_ TEMP.X13(SAVE="D10 D12 D11 D13", OUTTYPE="AO", OUTSPAN=RANGE, ARIMASMPL="1983M02 2013M12") @REG(REGS="EASTER[1],") @X11(MODE=ADD)".

However, this code works:

Code: Select all

temp.x13(save="d10 d12 d11 d13", outtype="ao", outspan="1983.Feb, 2013.Dec", arimasmpl="1983M02 2013M12") @reg(regs="easter[1],") @x11(mode=add)
Is there something I'm doing incorrectly?

Thanks

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Using Variables Rather than Strings in X13 function

Postby EViews Gareth » Mon Feb 22, 2016 9:07 am

Try:

Code: Select all

%range="1983.Feb, 2013.Dec" temp.x13(save="d10 d12 d11 d13", outtype="ao", outspan=%range, arimasmpl="1983M02 2013M12") @reg(regs="easter[1],") @x11(mode=add)

kszynkar
Posts: 45
Joined: Tue Feb 02, 2016 1:15 am
Location: Switzerland

Re: Using Variables Rather than Strings in X13 function

Postby kszynkar » Mon Feb 22, 2016 10:01 am

perfect. thank you


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests