I am having trouble programming a file to drop an identity within a model created via @append.
Say I had an identity Z= X+Y within a model object as a text-equation via '[model].append @identity Z=X+Y' and the model object has listed that as Eq3 after an equation for X and Y. Now suppose I want to change that identity for some reason. Before creating my new identity I have to delete the old one (to avoid two equations with the same RHS variable). I can do this manually by clicking on Eq3>right-click>delete and it uses .droplink in the capture window. Coding for an equation object Eq1 I can use '[model].droplink Eq1' but this does not seem to work for text equations such as Eq3 in this example, despite capture window showing droplink is used. Any help would be great?
Happy to provide a file but hopefully the simple example above is enough.
Thank you
Model .droplink for in-model text
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13598
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Model .droplink for in-model text
.droplink is only used to drop linked objects. To drop a variable, use .drop:
As an aside you could always just use .replace to do what you want, I think:
Code: Select all
wfcreate m 1990 2020
series y=nrnd
series x=nrnd
equation eq1.ls y c x
series z=nrnd
model m
m.append :eq1
m.append z=3*x
m.drop z
m.droplink eq1
Code: Select all
wfcreate m 1990 2020
series y=nrnd
series x=nrnd
equation eq1.ls y c x
series z=nrnd
model m
m.append :eq1
m.append z=3*x
m.replace z=4*x
-
redversjones
- Posts: 8
- Joined: Thu Dec 07, 2017 10:11 am
Re: Model .droplink for in-model text
Superb, thank you
Who is online
Users browsing this forum: No registered users and 2 guests
