Page 1 of 1

Error Message: Series subtracted from series in....

Posted: Tue Jul 28, 2020 10:00 pm
by Grant
Hi,

I'm using Eviews 11.

I'm updating forecasts using a model which has been programmed by another analyst. Having updated the excel file which eViews reads in the data from, I'm getting the following error message:

Series subtracted from series in "SCALAR PRIOR_AA = @MEAN(LOG(BAAAVOL)-LOG(RINC))*0.2" in 1_HOUSING_APPROVALS_EQNS.PRG on line 15.

PRIOR_AA is not defined in "MPRIOR_{%X}(1) = PRIOR_AA" in 1_HOUSING_APPROVALS_EQNS.PRG on line 31.
PRIOR_AA is not defined in "VPRIOR_{%X}(1) = @ABS(PRIOR_AA/10)" in 1_HOUSING_APPROVALS_EQNS.PRG on line 35.


Which relates to the following program code:

'--------------------
'Inputs/setup
'--------------------

'State starting values
smpl 1986 1986

scalar prior_house = @mean(log(bahousevol)-log(rinc))*0.1
scalar prior_other = @mean(log(baothervol)-log(rinc))*0.2
scalar prior_aa = @mean(log(baaavol)-log(rinc))*0.2

'Setup state-space objects
for %x house other aa
sspace ss_{%x}

'Define error terms
ss_{%x}.append @ename e1
ss_{%x}.append @ename e2

'Define error variances and covariances
ss_{%x}.append @evar var(e1) = c(111)^2
ss_{%x}.append @evar var(e2) = c(112)^2

'Specify initial state
vector(1) mprior_{%x}
mprior_{%x}(1) = prior_{%x}

'Specify initial variance
sym(1) vprior_{%x}
vprior_{%x}(1) = @abs(prior_{%x}/10)
next



Any ideas why the scalar prior_aa is no longer defined (prior to updating the data file, the program ran perfectly).

Much appreciated!

Re: Error Message: Series subtracted from series in....

Posted: Wed Jul 29, 2020 7:52 am
by EViews Gareth
I'd try breaking that line up into parts to see if it narrows down what is going on.

Code: Select all

series temp = LOG(BAAAVOL)-LOG(RINC)
SCALAR PRIOR_AA = @MEAN(temp)*0.2

Re: Error Message: Series subtracted from series in....

Posted: Wed Jul 29, 2020 2:10 pm
by Grant
Breaking it out solved the problem. That's great - thanks very much.

However, I now have some further error messages (which I believe stem from the same programming error which is then compounding throughout the rest of the program):

Missing value found in initial state element1 in "SS_AA.ML" in 1_HOUSING_APPROVALS_EQNS.PRG on line 73.
Sspace estimates are not valid in "SCALAR SCONV = SS_AA.@STDERRS(1)" in 1_HOUSING_APPROVALS_EQNS.PRG on line 90.
SCONV is not defined in "IF SCONV = NA THEN" in 1_HOUSING_APPROVALS_EQNS.PRG on line 92.
SCONV is not defined in "DELETE SCONV" in 1_HOUSING_APPROVALS_EQNS.PRG on line 96.
Sspace estimates are not valid in "SS_AA.MAKESTATES SV1F_AA" in 1_HOUSING_APPROVALS_EQNS.PRG on line 101.
Sspace estimates are not valid in "SS_{%X}.MAKESTATES(T=SMOOTH) SV1S_AA" in 1_HOUSING_APPROVALS_EQNS.PRG on line 102.
SV1S_AA is not defined in "EQUATION EQ_BAAAVOL.LS DLOG((BAAAVOL))-@MEAN(DLOG((BAAAVOL))) = C(1)*(LOG((BAAAVOL(-1))/RINC(-1))) + C(2)*(DLOG((BAAAVOL(-1)))-@MEAN(DLOG((BAAAVOL(-1))))) + C(4)*(DLOG(RDP(-1))-@MEAN(DLOG(RDP(-1)))) + C(5)*(DLOG(RDP(-2))-@MEAN(DLOG(RDP(-2)))) + C(6)*GST +C(7)*GST(-1) + C(8)*D(RVMR(-1))+ C(9)*D(RVMR(-2)) + C(10)*D(RVMR(-3)) + SV1S_AA" in 1_HOUSING_APPROVALS_EQNS.PRG on line 107.
SV1F_AA is not defined in "SERIES SV1F_{%X}_LR = EXP(SV1F_AA/-LAMBDA_AA)" in 1_HOUSING_APPROVALS_EQNS.PRG on line 111.
SV1S_AA is not defined in "SERIES SV1S_{%X}_LR = EXP(SV1S_AA/-LAMBDA_AA)" in 1_HOUSING_APPROVALS_EQNS.PRG on line 112.
Sspace estimates are not valid in "FREEZE(WALD_AA_RDP) SS_AA.WALD C(4)+C(5)=0" in 1_HOUSING_APPROVALS_EQNS.PRG on line 146.

These relate to the following code:


' Alts and adds (ss3)
%eqn_aa = "dlog((baaavol))-@mean(dlog((baaavol))) = c(1)*(log((baaavol(-1))/rinc(-1))) + c(2)*(dlog((baaavol(-1)))-@mean(dlog((baaavol(-1))))) + c(4)*(dlog(rdp(-1))-@mean(dlog(rdp(-1)))) + c(5)*(dlog(rdp(-2))-@mean(dlog(rdp(-2)))) + c(6)*gst +c(7)*gst(-1) + c(8)*d(rvmr(-1))+ c(9)*d(rvmr(-2)) + c(10)*d(rvmr(-3))"
ss_aa.append @signal {%eqn_aa} + sv1 + e1
ss_aa.append @state sv1 = sv1(-1) + e2
ss_aa.append @mprior mprior_aa
ss_aa.append @vprior vprior_aa
ss_aa.append @param c(1) -0.25218 c(2) -0.382857 c(3) -0.161701 c(4) 0.897113 c(5) 0.209084 c(6) -0.081849 c(7) -0.301105 c(8) -0.010692 c(9) -0.011795 c(111) -0.043175 c(112) 0.006503
ss_aa.ml
scalar lambda_aa = c(1)

'-------------------------------------
'-------------------------------------
'Post-estimation evaluation
'-------------------------------------
'-------------------------------------

'---------------
'Check convergence of estimated equations and make graphs
'The data constructed here is used in Graph 5 in the RDP
'---------------

for %x house other aa

'Check convergence
scalar sconv = ss_{%x}.@stderrs(1)
%ssname = ss_{%x}.@displayname
if sconv = na then
@uiprompt(%ssname+" state space model did not converge to a solution. Adjust code and try again?", "O")
return
endif
delete sconv

'Save time-varying intercepts
smpl @all
'ss_{%x}.makestates(t=filt) sv1f_{%x} 'Time-varying intercept (filtered)
ss_{%x}.makestates sv1f_{%x} 'Time-varying intercept (1-step ahead)
ss_{%x}.makestates(t=smooth) sv1s_{%x} 'Time-varying intercept (2-sided)
'Note: f* represents predicted state, which will differ (by one quarter) from filtered state

'Estimate using OLS so that the equations can be appended to a model
smpl %sd_approvals %ed
equation eq_ba{%x}vol.ls {%eqn_{%x}} + sv1s_{%x} 'Uses 2-sided filter (this results in same coefficients as state-space equation)

smpl @all
'Scale and graph time-varying intercepts for graphs
series sv1f_{%x}_lr = exp(sv1f_{%x}/-lambda_{%x})
series sv1s_{%x}_lr = exp(sv1s_{%x}/-lambda_{%x})

'Extend over forecast horizon
smpl %sfc @last
series sv1f_{%x}_lr = sv1f_{%x}_lr(-1)
next

'Aggregate time-varying intercept'
smpl @all
series sv1f_total_lr = sv1f_house_lr + sv1f_other_lr + sv1f_aa_lr
series sv1s_total_lr = sv1s_house_lr + sv1s_other_lr + sv1s_aa_lr

'---------------
'Put together tables with coefficient sums and Wald tests
'This is used for for Table 1 in the RDP
'---------------

'Detached houses
freeze(wald_house_rmvr) ss_house.wald c(9)+c(10)+c(11)=0
wald_house_rmvr(1,2) = "Sum of RVMR coefficients on detached"
freeze(wald_house_gst) ss_house.wald c(6)+c(7)+c(8)=0
wald_house_GST(1,2) = "Sum of GST coefficients on detached"

'Higher-density housing
freeze(wald_other_lag) ss_other.wald c(3)+c(4)=0
wald_other_lag(1,2) = "Sum of lag coefficients on high-density"
freeze(wald_other_GST ) ss_other.wald c(5)+c(6)=0
wald_other_GST (1,2) = "Sum of GST coefficients on high-density"
freeze(wald_other_rdp) ss_other.wald c(7)+c(8)=0
wald_other_rdp(1,2) = "Sum of RDP coefficients on high-density"
freeze(wald_other_rmvr) ss_other.wald c(11)+c(12)+c(13)=0
wald_other_rmvr(1,2) = "Sum of RVMR coefficients on high-density"

'Alterations and additions
freeze(wald_aa_rdp) ss_aa.wald c(4)+c(5)=0
wald_aa_rdp(1,2) = "Sum of RDP coefficients on aa"
freeze(wald_aa_GST ) ss_aa.wald c(6)+c(7)=0
wald_aa_GST (1,2) = "Sum of GST coefficients on high-density"
freeze(wald_aa_rmvr) ss_aa.wald c(8)+c(9)+c(10)=0
wald_aa_rmvr(1,2) = "Sum of RVMR coefficients on aa"

'------------------------------------------

Any ideas on what's wrong? Again, when I run this code with the old dataset, none of these errors messages arise.

Greatly appreciated.

Re: Error Message: Series subtracted from series in....

Posted: Thu Jul 30, 2020 7:18 pm
by Grant
Apologies--please ignore the above post--I've located the problem. Many thanks once more for your assistance, Gareth.