Page 1 of 1

Adjusting sample size

Posted: Mon Sep 09, 2013 10:40 am
by ectrie
Hello everybody !

I have written a big program in EViews. Now that everything works I want to generalize my program. That means, in stead of manually putting scalars everywhere I want to do it just one time on top of my program. For example:

on top of my program I stated: "scalar test = 20"
My samplesize is changing a lot through my program. If i now state:

"smpl 1 test" this will give an error: error in sample: Illegal date.
But if i put: "smpl 1 20" it works.

Does anyone know how to fix this? I checked the help documentation but I did not get any wiser from this.

I also tried "@test" , "!test" and "smpl 1 1 test"
It all did not work. All help is highly appreciated.

Thanks in advance!!!!!!!!!

Re: Adjusting sample size

Posted: Mon Sep 09, 2013 11:11 am
by EViews Glenn
[edit]Use a program variable or a string.

Code: Select all

%test = "20" !test1 = 20 smpl 1 %test smpl 1 !test1

Re: Adjusting sample size

Posted: Mon Sep 09, 2013 11:18 am
by ectrie
Aah yes! Now it works! Thank you very much!!!!!!!!!!

Re: Adjusting sample size

Posted: Mon Sep 09, 2013 11:18 am
by EViews Glenn
You're running this in a program? What's the error message. I just ran with both the string and program variables with no error.

Re: Adjusting sample size

Posted: Mon Sep 09, 2013 3:35 pm
by ectrie
Yes running in a program. Working now! Thank you!!!!