Adding model residuals and averages to a new series

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

Moderators: EViews Gareth, EViews Moderator

JuliaZhul
Posts: 1
Joined: Wed Sep 09, 2020 6:15 am

Adding model residuals and averages to a new series

Postby JuliaZhul » Fri Sep 11, 2020 12:01 am

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

EViews Matt
EViews Developer
Posts: 446
Joined: Thu Apr 25, 2013 7:48 pm

Re: Adding model residuals and averages to a new series

Postby EViews Matt » Fri Sep 11, 2020 2:26 pm

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))


Return to “Models”

Who is online

Users browsing this forum: No registered users and 4 guests