Univariate Structural time series analysis
by Brian Revell
Using the GUI, the estimation output is overwritten in the Gretl assemblage
in the Windows taskbar if an alternative specification is chosen, including
estimation results , graphs of model fit and forecast . On the other hand
ARIMA option (and for that matter OLS estimation) retains all model variant
outputs and graphs for inspection and comparison. While I realise the
output, graphs et can be saved, this really is not necessary in the process
of model selection where a visual inspection is more efficient and less
time consuming. Any chance this can be rectified?
Brian
Professor Emeritus
Agricultural and Food Economics
Harper Adams University
Newport
Shropshire TF10 8NB
Tel 01952 815237
Tel: +44 1952 728153
Mbl +44 7976 538712
University: +44 1952 815235
alt: email: bjrevell(a)harper-adams.ac.uk
3 years, 11 months
gretl vs Stata: different WLS estimates for weights=0
by Artur Bala
Dear all,
I realized that WLS estimation results in gretl are different from those
in Stata
in the case when observations with weight=0 do exist.
Now, in gretl, the mechanics of the algorithm drops these observations
from the estimation process. And indeed, both Stata and gretl report the
same
number of observations (ie. observations actually involved in computing)
with gretl
giving addtional info on dropped observations.
Consequently, gretl doesn't provide postestimation values on these
dropped
observations (uhat, yhat)...but Stata does!!! And I struggle to
understand the logic
behind Stata's proceeding and how it affects the estimates...
Best,
Artur
3 years, 11 months
Univariate Time Series Structural Time Series Options
by Brian Revell
The three model selection options, Local Level, Local linear Trend and
Basic structural Model all appear to give the same parameter estimates if
the same combination of options regarding irregular, trend and slope are
selected . Is this to be expected? If so, why the need to differentiate
the three model types?
Brian
Brian J Revell
Professor Emeritus
Agricultural and Food Economics
Harper Adams University
Newport
Shropshire TF10 8NB
Tel 01952 815237
Tel: +44 1952 728153
Mbl +44 7976 538712
University: +44 1952 815235
alt: email: bjrevell(a)harper-adams.ac.uk
3 years, 11 months
[Sys-GMM Dynamic panel data comparison]
by JOSE FRANCISCO PERLES RIBES
Dear list:
Probably this message shoud be better addressed to a Stata list than to
this one. However, I usually use Gretl for my estimations and probably
somebody in the list has had the same issue and could be of interest of
other Gretl users.
I know that estimations using different statistical packages usually should
lead to different results due to different setting defaults, algorithms
used, etc.
Recently, I have been introduced in dynamic panel data model. As usual, I
first tried Gretl to do my estimations.
The question is that I'm trying to compare the results in gretl and Stata
for a dynamic panel data model on the same dataset using the sys-gmm
estimator of Blundell and Bond (1998).
I have tried to do it in Gretl using the gretl GUI with 1 step estimator,
no time dummies and including the equation in levels as follows (command
log):
dpanel 1 ; Afiliados 0 Coast Aerop70 Walk Pmain Dens DPrs11_2 --system \
--dpdstyle
where most of the explanatory variables Coast, Aerop70, Walk, Pmain and
Dprs11_2 are time invariant.
For this setting I get the following coefficients:
Model 2: 1-step dynamic panel, using 680 observations
Included 136 cross-sectional units
Including equations in levels
H-matrix as per Ox/DPD
Dependent variable: Afiliados
coefficient std. error z p-value
--------------------------------------------------------------
Afiliados(-1) 1.04336 0.00244793 426.2 0.0000 ***
const 100.007 60.8670 1.643 0.1004
Coast 1.13130 0.554658 2.040 0.0414 **
Aerop70 16.3194 21.2904 0.7665 0.4434
Walk −1.73009 6.48870 −0.2666 0.7898
Pmain −2.92214 1.00457 −2.909 0.0036 ***
Dens −0.0164583 0.0129767 −1.268 0.2047
DPrs11_2 −64.0195 31.7635 −2.016 0.0439 **
Sum squared resid 57679996 S.E. of regression 292.9733
Number of instruments = 21
Test for AR(1) errors: z = -3.63181 [0.0003]
Test for AR(2) errors: z = 0.0197901 [0.9842]
Sargan over-identification test: Chi-square(13) = 163.021 [0.0000]
Wald (joint) test: Chi-square(7) = 414893 [0.0000]
When I try to estimate the model in Stata using the following command:
. xtdpdsys Afiliados Coast Aerop70 Walk Pmain Dens residential, lags(1)
artests(2)
I get the following result:
note: Coast dropped from div() because of collinearity
note: Aerop70 dropped from div() because of collinearity
note: Walk dropped from div() because of collinearity
note: Pmain dropped from div() because of collinearity
note: residential dropped from div() because of collinearity
System dynamic panel-data estimation Number of obs =
680
Group variable: Municipio Number of groups =
136
Time variable: Year
Obs per group:
min =
5
avg =
5
max =
5
Number of instruments = 16 Wald chi2(6) =
708786.67
Prob > chi2 =
0.0000
One-step results
------------------------------------------------------------------------------
Afiliados | Coef. Std. Err. z P>|z| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
Afiliados |
L1. | .9912949 .0126633 78.28 0.000 .9664753
1.016114
|
Coast | 188.1017 38.27705 4.91 0.000 113.08
263.1233
Aerop70 | 0 (omitted)
Walk | -503.8206 395.3154 -1.27 0.202 -1278.624
270.9833
Pmain | 293.8372 82.27726 3.57 0.000 132.5768
455.0977
Dens | -.8086489 .5405354 -1.50 0.135 -1.868079
.250781
DPrs11_2l | 4815.363 1926.302 2.50 0.012 1039.88 8590.846
_cons | -16164.83 3962.049 -4.08 0.000 -23930.31
-8399.358
------------------------------------------------------------------------------
Instruments for differenced equation
GMM-type: L(2/.).Afiliados
Standard: D.Dens
Instruments for level equation
GMM-type: LD.Afiliados
Standard: _cons
As it can be seen, the number of observations and entities are the same.
However, the number of instruments is different relating to the Gretl
output (probably some of the defaults have different behaviour) but, the
magnitude of coefficients is very different, and what to me is most
worrying is that in Gretl there is a coefficient for the variable
"Aerop70", however Stata drops this variable probably due to the
collinearity issues with no coefficient estimated.
Somebody has a clue on how to replicate the Gretl setting for this model in
Stata? It is in the xtdpdsys command where it should be replicated or in
the other command (xtabond2) that I have seen that somebody uses to
estimate this kind of models.
Thanks in advance and sorry for inconvenience.
José Perles
University of Alicante
Spain.
3 years, 11 months
"summary" over all variables on gretl console
by Artur Bala
Hi Allin,
I came across a discrepancy in the output for the "summary" command when no
series are specified. *In a script*, the following lines work fine:
<hansl>
open http://www.stata-press.com/data/r13/auto.dta
summary
</hansl>
but eventually, when typing "summary" *in the command line* (and I came
across it by pure chance), the "IQ range" and "Missing obs." labels shift
to the left replacing the 5% and 95% percentile labels - labels only, not
the columns - and the last two columns (actual "IQ range" and "Missing
obs.") appear with no label at all.
Best,
Artur
3 years, 11 months
gretl 2021a released
by Allin Cottrell
See http://gretl.sourceforge.net/
Here's the change log entry:
2021-01-18, version 2021a
- New function vma() for multiple time series
- quantile(): support variant methods Q7 and Q8 described
in Hyndman and Fan (1996)
- defbundle(): add two shorthand variants of this function
- irf(): support calculation of multiple impulse responses
in a single call (with internal speed-up)
- irf() bug-fix: failing to compute bootstrap confidence band
correctly when passed a $system bundle argument
- VAR internals: scrap augmented Cholesky matrix; so the
$system.C accessor is now a square matrix
- $system bundle: ensure presence of xlist member, and
include the command-word (var, vecm or system)
- mread(): support reading gdt and gdtb files as matrices
- readfile(): support reading gzipped files transparently
- obslabel(): support a vector of observations
- nls/mle/gmm blocks: support use of printf statements
- "open" command: support reading selected series from
native gretl datafiles (gdt, gdtb)
- "join" command: support $obsmajor, $obsminor as outer keys
- "coint2" command: rename as "johansen"
- "freq" and "xtab" for string-valued series: don't let
non-ASCII characters break the formatting
- Gretl User's Guide: add links to download example scripts
- Reorganize the categories for the functions help file
- Fix obscure problem with plots: inability to show markers
for observations in some cases where this should be OK
- Fix memory leak on deleting a series with descriptive
label attached
- Fix excessive messaging on renaming series in a loop, a
serious issue if the dataset contains very many series
- Fix breakage in handling of boolean comparisons involving
missing values
- Fix bug: potential crash on "Save as icon and close" for
a model displayed in tabbed model viewer
- Fix bug: possible crash on confusion between singleton
array and array element within a loop
- Fix bug: crash after setting "specific lags" for a VAR in
the GUI model selection dialog
- Fix bug: possible crash on frequency plot for series with
long string values
- Fix: text encoding for RTF printing of model output broken
in some cases under translation
- Fix: memory leaks associated with GUI window lists
- Fix: buggy completion proposals in script editor when
using gtksourceview-2.0
- Fix Windows-specific bug: gretlcli and gretlmpi could
fail on parsing command-line arguments
--
Allin Cottrell
Department of Economics
Wake Forest University
3 years, 11 months
multi-step-ahead-forecasting
by Burak Korkusuz
Hi,Below is an example for one-step ahead forecasting that I use the first 5 obs. for initial sample and then forecast one-step-ahead by rolling ahead.My question is that how should I change my code to get 5-step-ahead rolling forecast.Thanks,
open denmark.gdtset verbose offseries frcst = NAloop i=1..20 -q #out-of-sample (20 observations)# smpl 1+i 5+i #initial sample (5 observations)# ols LRM const LRY fcast 6+i 6+i #one-step-ahead-rolling-windows-forecasting# frcst[6 + i] = $fcastendloop
3 years, 11 months