"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "addons/SVAR/SVAR_estim_backend.inp" between
gretl-2020a.tar.xz and gretl-2020b.tar.xz

About: gretl (Gnu Regression, Econometrics and Time-series Library) is a cross-platform statistical package mainly for econometric analysis.

SVAR_estim_backend.inp  (gretl-2020a.tar.xz):SVAR_estim_backend.inp  (gretl-2020b.tar.xz)
skipping to change at line 124 skipping to change at line 124
endif endif
# extra lags # extra lags
if p > 1 if p > 1
mreg ~= mlag(dY, seq(1,p-1)) mreg ~= mlag(dY, seq(1,p-1))
endif endif
# trim the first rows # trim the first rows
if rows(mreg)>0 if rows(mreg)>0
mreg = mreg[p+1:T,] mreg = mreg[p+1:T,]
# printf "%d rows\n", rows(dep)
# printf "%8.3f\n", (dep[1:10,] ~ mreg[1:10,])
matrix olspar = mols(dep, mreg, &E) matrix olspar = mols(dep, mreg, &E)
else else
matrix olspar = {} matrix olspar = {}
E = dep E = dep
endif endif
df = T - (n*p + k - (n-r)) # FIXME: aren't the unrestr. determ. terms missin g? df = T - (n*p + k - (n-r)) # FIXME: aren't the unrestr. determ. terms missin g?
# (but apparently df is never used again...) # (but apparently df is never used again...)
matrix Sigma = (E'E)./T matrix Sigma = (E'E)./T
skipping to change at line 165 skipping to change at line 163
scalar nd = 1 scalar nd = 1
elif dcase == 4 elif dcase == 4
matrix mu = olspar[1,] |(jbeta[n+1,] * jalpha') matrix mu = olspar[1,] |(jbeta[n+1,] * jalpha')
scalar nd = 1 scalar nd = 1
elif dcase == 5 elif dcase == 5
matrix mu = olspar[1:2,] matrix mu = olspar[1:2,]
scalar nd = 2 scalar nd = 2
endif endif
if k > 0 if k > 0
# matrix sel = nd + seq(1, k)
mu = mu | olspar[nd + 1 : nd + k,] # was: mu ~ olspar[sel,] mu = mu | olspar[nd + 1 : nd + k,] # was: mu ~ olspar[sel,]
endif endif
/* /*
companion form in levels companion form in levels
*/ */
Pi = jalpha * jbeta[1:n,]' Pi = jalpha * jbeta[1:n,]'
if p > 1 if p > 1
# the Gammas are always at the back: # the Gammas are always at the back:
ini = rp - ng + 1 ini = rp - ng + 1
/* old code:
if ols_al
# the Gammas should be after the ECM terms
ini = nd + k + r + 1 # (k was missing)
else
# the Gammas should be right after the exogenous (was: deterministics
)
ini = nd + k + 1 # (k was missing)
endif
fin = ini + (p-1) * n - 1
*/
matrix A = olspar[ini: ,] | zeros(n,n) # was: ini:fin matrix A = olspar[ini: ,] | zeros(n,n) # was: ini:fin
A += I(n) + Pi' | -olspar[ini: ,] A += I(n) + Pi' | -olspar[ini: ,]
else else
matrix A = I(n) + Pi' matrix A = I(n) + Pi'
endif endif
matrix SVARobj.VARpar = A' matrix SVARobj.VARpar = A'
matrix SVARobj.mu = mu matrix SVARobj.mu = mu
matrix SVARobj.Sigma = Sigma matrix SVARobj.Sigma = Sigma
matrix SVARobj.E = E matrix SVARobj.E = E
 End of changes. 3 change blocks. 
14 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)