Inside a loop i successfully define a series name, but i can't figure out how to use that name subsequently in the loop. The program is
string str_endog = "NA11 NA22 NA23 NA39 NA42 NA46 NA47 NA51 NA52 NA53 NA54 NA55 NA56 NA61 NA62 NA71 NA72 NA81 NA92"
for !i = 1 to @wcount(str_endog)
%b{!i} = @wmid(str_endog,{!i},1)
series dl{%b{!i} } = dlog( {%b{!i} } )
dl{%b{!i} }.X13(save="d10 d11", arimasmpl="1967Q1 2014Q4") @X11()
next
I get an error message: Unmatched curly braces in "dl{%b{!i}" in "DL{%B{!I} }.X13(SAVE="D10 D11", ...
Pls help. Thanks
david
series name in loop
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Re: series name in loop
There is a space between the brackets. And since you generate series that have negative values, you should change the default mode of seasonal adjusment from multiplicative to additive:
dl{%b{!i}}.X13(save="d10 d11", arimasmpl="1967Q1 2014Q4") @X11(mode=add)
dl{%b{!i}}.X13(save="d10 d11", arimasmpl="1967Q1 2014Q4") @X11(mode=add)
Re: series name in loop
thank you troubadour; you saved me hours of debugging. Lesson learned for 2nd time: mind your spaces. and thanks for the mode=add coding
Who is online
Users browsing this forum: No registered users and 2 guests
