Page 1 of 1

defining a sample with @wunion

Posted: Sat Feb 28, 2015 4:41 am
by jgarnier
Hi,
I’d like to add two strings together in order to define the sample.

The following codes work well :
%s = "@all if dep_invest>0"
%s2 = "and rrf>0"
%s3 = @wunion(%s,%s2)
smpl %s3

But when I add a third variable (‘autofi’ here),
%s = "@all if dep_invest>0"
%s2 = "and rrf>0 and autofi>0"
%s3 = @wunion(%s,%s2)
smpl %s3
I get an error message like « error in sample: syntax error in "smpl @all if dep_invest>0 and rrf>0 autofi>0»

note that a simple :
%s = "@all if dep_invest>0 and rrf>0 and autofi>0"
smpl %s
works.

Any clue ?
Thanks in advance! :)

Re: defining a sample with @wunion

Posted: Sat Feb 28, 2015 4:59 am
by EViews Gareth
Don't use @wunion. Just add the strings together with the + symbol

Re: defining a sample with @wunion

Posted: Mon Mar 02, 2015 8:53 am
by jgarnier
It works. Thanks a lot !
Cheers
J