Page 1 of 1

Adding model residuals and averages to a new series

Posted: Fri Sep 11, 2020 12:01 am
by JuliaZhul
Hi!

I want to add a new series, y, to my model. The series is defined as the sum of a residuals series from an equation and an average value of a certain series, x, that is already estimated in the model. For now, I generate a new series for both residuals and the average value series, before I define my new series.

m.solve
{%eqName}.ls (dlog(x) -@mean(dlog(x))) d1 d2
{%eqName}.makeresids res
genr x_mean = @mean(dlog(x))
m.exclude(actexist=t)
m.merge {%eqName}
m.append dlog(y) = res +x_mean
m.solve

Is there any way the series, y, could be defined directly, to make the model more transparent? For instance:

m.append dlog(y) = {%eqName}.makeresids + @mean(dlog(x))

Thanks!


Julia

Re: Adding model residuals and averages to a new series

Posted: Fri Sep 11, 2020 2:26 pm
by EViews Matt
Hello,

While you can include the expression for the mean directly in your model specification, I haven't thought of a way around explicitly creating the equation residuals. Perhaps more expressive series naming would improve transparency satisfactorily. For example,

{%eqName}.makeresids {%eqName}_resid
...
m.append dlog(y) = {%eqName}_resid + @mean(dlog(x))