Adding model residuals and averages to a new series
Posted: 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
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