Object Reference : Object View and Procedure Reference : Model
Replace the text specification for an endogenous variable in the model with a new specification.
model_name.replace new_specification
The replace command will only replace the specification for variables that currently have a text specification in the model. Variables defined by a linked object cannot have their specification replace. New_specification should be the new text specification for the variable. Note EViews will automatically detect the endogenous variable in the new specification, even if it is contained in an implicit expression, and will replace the existing specification for that variable.
model m1
m1.append x = 3*y
m1.replace x = 4*y
this trivial example first creates a model, M1, then adds a text specification for the variable X, setting it equal to 3*Y.  It then changes the specification for X to set it equal to 4*Y.
model m1
m1.append x = 3*y
m1.replace log(x) = 4*y
this example replaces the specification for X by setting the log of X equal to 4*Y.
model m1
m1.append log(x/w) = 3*y
m1.replace x^2 = 4*y
this example first defines using an expression, log(X/W), The replace command is used to change that definition to be in terms of X^2. EViews automatically detects that the new specification, even though it is based in terms of X^2, should be used to replace the current line involving log(X/W).