Declaring an equation out of another one

For questions regarding programming in the EViews programming language.

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

emperortomato

Declaring an equation out of another one

Postby emperortomato » Wed Mar 30, 2016 5:45 am

Hello,

I searched this forum for an answer and hopefully I did not miss any. So, my problem is, I want to run an equation several time each with different sample (like rolling) but I want to keep each different equation in the workfile as well. To illustrate, let's say I have an equation named eq01, not I want to declare 20 different equations called eq_01_1, eq01_2 such that they share the same model but only samples differ. I know that I can do this with a for loop but I want to declare my equations out of eq01, not writing the equation explicitly, because I have too many of equations from which I will run several with different samples that it will be too time consuming to write each equation in the for loop. What I aim is to have such a code

Code: Select all

for i = 1:10 smpl date(i-1) date(i) equation eq01_i = eq01 equation eq02_i = eq02 end for
In this example, I have 2 different equations and I will estimate several for each. Now that I have too many different equations, I only want to write the already existing equation names but not their open form, like, equation eq01_i.ls y c x.

Hope I am clear enough. Thanks in advance.

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

Re: Declaring an equation out of another one

Postby EViews Gareth » Wed Mar 30, 2016 5:47 am

You can use the copy command to create a copy of the equation under a different name

emperortomato

Re: Declaring an equation out of another one

Postby emperortomato » Wed Mar 30, 2016 7:16 am

Exactly what I asked. Thanks @gareth


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests