Adjusting sample size

For questions regarding programming in the EViews programming language.

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

ectrie
Posts: 9
Joined: Mon Sep 09, 2013 10:24 am

Adjusting sample size

Postby ectrie » Mon Sep 09, 2013 10:40 am

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!!!!!!!!!

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Adjusting sample size

Postby EViews Glenn » Mon Sep 09, 2013 11:11 am

[edit]Use a program variable or a string.

Code: Select all

%test = "20" !test1 = 20 smpl 1 %test smpl 1 !test1
Last edited by EViews Glenn on Mon Sep 09, 2013 11:17 am, edited 2 times in total.

ectrie
Posts: 9
Joined: Mon Sep 09, 2013 10:24 am

Re: Adjusting sample size

Postby ectrie » Mon Sep 09, 2013 11:18 am

Aah yes! Now it works! Thank you very much!!!!!!!!!!

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Adjusting sample size

Postby EViews Glenn » Mon Sep 09, 2013 11:18 am

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.

ectrie
Posts: 9
Joined: Mon Sep 09, 2013 10:24 am

Re: Adjusting sample size

Postby ectrie » Mon Sep 09, 2013 3:35 pm

Yes running in a program. Working now! Thank you!!!!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests