Find/Delete or Replace an equation in model's text form?

For technical support, tips and tricks, suggestions, or any other information regarding the EViews model object.

Moderators: EViews Gareth, EViews Moderator

tbui
Posts: 18
Joined: Tue Dec 21, 2010 3:26 pm

Find/Delete or Replace an equation in model's text form?

Postby tbui » Mon Oct 07, 2013 8:00 am

Hi all,

We used the GI US model for work. We did replace a few equations for own likings. However, we have to do the replacements manually every month when new GI forecast come out. Is there any way to program that part? We do have a fixed set of equations we'd like to replace.

Thanks,

T

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

Re: Find/Delete or Replace an equation in model's text form?

Postby EViews Gareth » Mon Oct 07, 2013 8:05 am

You can use either model.replace or model.replacelink. Both are documented in the Object Reference.
Follow us on Twitter @IHSEViews

tbui
Posts: 18
Joined: Tue Dec 21, 2010 3:26 pm

Re: Find/Delete or Replace an equation in model's text form?

Postby tbui » Mon Oct 07, 2013 8:51 am

Got it work. Also, it seems like equations coefficients must be fully substituted to have it work properly if LHS has been transformed (i.e., log(sp500) versus sp500 originally)?
Thanks,
T

tbui
Posts: 18
Joined: Tue Dec 21, 2010 3:26 pm

Re: Find/Delete or Replace an equation in model's text form?

Postby tbui » Mon Oct 07, 2013 9:10 am

Hi Gareth,
I guess what I'm really looking for is to replace a text specification of an equation with a linked one so that we can easily find and modify it later in the process. I can write a code to replace all equations that have been modified by us in the GI US Macro model. However, it is often proned to err if one forgets to update the text specifications after playing with the equation object.
Is there anyway to completely remove the text specification and replace with a linked equation within the model?
Thanks,
T

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

Re: Find/Delete or Replace an equation in model's text form?

Postby EViews Gareth » Mon Oct 07, 2013 9:16 am

Use model.drop to drop the existing specification, then model.append to add a new one.
Follow us on Twitter @IHSEViews

tbui
Posts: 18
Joined: Tue Dec 21, 2010 3:26 pm

Re: Find/Delete or Replace an equation in model's text form?

Postby tbui » Mon Oct 07, 2013 9:26 am

Great, I thought it didn't work with text. Now it's easier. Also, I think the command I will use is the model.merge to add the new linked equation object.
Thanks very much,
T

jfgeli
Posts: 72
Joined: Fri Jan 30, 2009 6:29 pm

Re: Find/Delete or Replace an equation in model's text form?

Postby jfgeli » Mon Mar 03, 2014 9:13 am

Hi,
I am trying to replace an equation in my model with the replace command but somehow it does not work. The model is called mod_01 so I do mod_01.replace c = a + b +c . I am using Eviews 7.2 but I could not find the documentation in the command reference. Could you please show me with an example how it works?
Cheers,
Fede

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

Re: Find/Delete or Replace an equation in model's text form?

Postby EViews Gareth » Mon Mar 03, 2014 9:17 am

It isn't available in EViews 7.
Follow us on Twitter @IHSEViews


Return to “Models”

Who is online

Users browsing this forum: No registered users and 21 guests