Re: [Gretl-users] compact dataset
by Allin Cottrell

On Tue, 15 Feb 2011, Annaert Jan wrote:
> I encountered a strange behaviour when trying to compact a
> time-series dataset. I have a monthly dataset from 1837:12 to
> 2008:12. When I compact the dataset to annual using the GUI (and
> selecting the 'last' method) everything works well, except that
> the last annual observation turns out to be 2007 instead of
> 2008...
Thanks for the report. This should now be fixed in CVS and
snapshots.
Allin Cottrell
13 years, 8 months

error message
by Data Analytics Corp.

Hi,
I teach an econometrics course at Rutgers and use Gretl for lab
assignments. One student is having a problem. He created a data set in
Gretl but when he tried to plot two series (real GDP and the S&P500), he
got this error message:
"D:\gretl\wgnuplot.exe"
"C:\Users\Cem's\AppData\Roaming\gretl\gpttmp.f06928": exit code 1"
He sent me his data and I opened it and created a graph perfectly. So
it's not the data. We're both using a Windows Vista machine. Any hints
as to the error message?
Thanks,
Walt
________________________
Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
________________________
(V) 609-936-8999
(F) 609-936-3733
walt(a)dataanalyticscorp.com
www.dataanalyticscorp.com
_____________________________________________________
13 years, 8 months

compact dataset
by Annaert Jan

I encountered a strange behaviour when trying to compact a time-series dataset. I have a monthly dataset from 1837:12 to 2008:12. When I compact the dataset to annual using the GUI (and selecting the 'last' method) everything works well, except that the last annual observation turns out to be 2007 instead of 2008. I'm using Gretl 1.9.3 and have encountered this behaviour both on Mac OS and on Windows XP.
When I add a dummy obs for 2009:01 and then compact, the last observation is indeed 2008 in the annual dataset. So, I'm not stuck but I was wondering whether the compacting behaviour is working as intended or whether it is a small bug.
Jan Annaert
13 years, 8 months

Re: [Gretl-users] Sign mix-up for ordered logit
by Allin Cottrell

On Sat, 12 Feb 2011, Allin Cottrell wrote:
> On Sat, 12 Feb 2011, Birger Baksaas wrote:
>
> > Coefficients from the Ordered Logit function are correct in gretl, but
> > the signs seem to be mixed up.
>
> I note that the gretl coefficients and cut-points (magnitude and
> sign) agree with those given by Wooldridge...
In addition:
<script>
open pension.gdt
logit pctstck const choice finc25 wealth89 prftshr
foreign language=R --send-data
library(MASS)
y <- factor(pctstck)
plr <- polr(y ~ choice + finc25 + wealth89 + prftshr,
method = "logistic")
summary(plr)
end foreign
</script>
The coefficients (and cut points) given by gretl and R are
identical in both magnitude and sign.
Allin Cottrell
13 years, 8 months

Re: [Gretl-users] changing panel data structure
by Allin Cottrell

On Fri, 11 Feb 2011, Summers, Peter wrote:
> Thanks for the clarifications. One thing though -- if I change
> the data structure to stacked cross sections, the data get
> re-organized as expected. But if I then say it's stacked cross
> sections a second time, the second re-organization doesn't
> restore the original stacked time series.
I believe gretl does this correctly, as per the user's
instructions. (I have constructed and manipulated some dummy panel
datasets to verify this.)
But you will have to pay very careful attention to your
specification of how many cross-sectional units and how many time
periods compose the panel (bearing in mind what you're claiming to
be the current organization). You can flip easily back and forth
between the two structures only if the numbers of units and
periods are the same. Otherwise it is easy to scramble the dataset
much like a Rubik's cube.
A more foolproof method is to ensure that the dataset contains two
variables that serve as indices of the unit and the period, and to
employ the "Use index variables" method in the panel structure
dialog. (Stata, for instance, only accepts this method for
defining a panel.)
Allin Cottrell
13 years, 8 months

Re: [Gretl-users] Sign mix-up for ordered logit
by Allin Cottrell

On Sat, 12 Feb 2011, Birger Baksaas wrote:
> Coefficients from the Ordered Logit function are correct in gretl, but
> the signs seem to be mixed up.
>
> According to the user guide, gretl fits an ascending cumulative odds
> model. Then it predicts the odds of being at or below a particular
> category. In this case the slopes for independent variables simply have
> wrong signs.
I note that the gretl coefficients and cut-points (magnitude and
sign) agree with those given by Wooldridge in his Econometric
Analysis of Cross Section and Panel Data, Example 15.5 on Asset
Allocation. A script for this example is in the Gretl User's Guide
(in fact ordered probit is used, but the signs are the same for
logit). And the theoretical account of the method in the User's
Guide is, so far as I can see, fully consistent with that given by
Wooldridge. So I'm puzzled.
Allin Cottrell
13 years, 8 months

Re: [Gretl-users] changing panel data structure
by Allin Cottrell

On Thu, 10 Feb 2011, Summers, Peter wrote:
> While helping a student sort out a dynamic panel estimation, I
> discovered the following. If I take a data set that's organized
> as stacked time series, change the structure to stacked
> cross-sections, then change it back, the second change isn't
> implemented. I get a box saying no changes were made. Is this
> intended behavior?
Ah, maybe it's a bit confusing but in fact it is intended. The
main point is that a panel dataset _must_ be organized as stacked
time series for use in gretl. "Stacked cross sections" is not an
option for panel data in gretl, it's just a way of saying that
your data are currently the wrong way round and need to be fixed.
So, if you go to "/Data/Dataset structure" and say that your
dataset is stacked cross sections, gretl will reorganize it for
you as stacked time series (a "physical" reorganization of the
data). Note that if you then go back to the "Dataset structure"
dialog your data will initially appear as "Stacked time series",
so, naturally, stating that the structure is stacked time series
will produce no change.
If you want to change the actual data layout back to what it was
originally, you have to say that it's stacked cross sections
(again), and gretl will reorganize the data in the opposite
direction.
Allin Cottrell
13 years, 8 months

positive and negative signs of the coefficients in the ARIMA equations
by Sam Sam

Dear all:
I have a question about positive and negative signs of the coefficients of ARIMA when it is expressed in the equation form. There is the output of ARIMA(1,1,1)(1,1,1) below:
Function evaluations: 132
Evaluations of gradient: 45
Model 1: ARIMA, using observations 1977:03-1986:12 (T = 118)
Estimated using BHHH method (conditional ML)
Dependent variable: (1-L)(1-Ls) y
coefficient std. error z p-value
---------------------------------------------------------
phi_1 0.0767983 1.75029 0.04388 0.9650
Phi_1 -0.133120 0.159001 -0.8372 0.4025
theta_1 -0.0385106 1.77542 -0.02169 0.9827
Theta_1 -0.662710 0.131924 -5.023 5. 08e-07 ***
The equation should be written in(1-0.0767983B)(1+0.133120B^12)(1-L)(1-L_12) y_t=(1-0.0385106B)(1-0.662710L^12)a_t
,
(1-0.0767983B)(1+0.133120B^12)(1-L)(1-L_12) y_t=(1+0.0385106B)(1+0.662710L^12)a_t
or
(1+0.0767983B)(1-0.133120B^12) (1-L)(1-L_12) y_t=(1-0.0385106L)(1-0.662710L^12)a_t
?B is backshit oprator
which equation is correct?
I don’t know the correct positive and negative signs of the coefficients in the ARIMA equation.
Another sample is ARIMAX. I add two dummy variables: dm1 is for January, dm2 is for Febuary. There is the output of ARIMAX(1,1,1) below:
Model 4: ARMAX, 使用中之子樣本範圍: 1997:03-2006:12 (T = 118)
Estimated using BHHH method (最大概似法 conditional ML)
應變數 (Dependent variable): (1-L) new_zwaland coefficient std. error z p-value
--------------------------------------------------------------
const 6971.19 4629.76 1.506 0.1321
phi_1 -0.0428580 0.174013 -0.2463 0.8055
theta_1 0.719310 0.107846 6.670 2.56e-011 ***
dm1 -78779.9 14357.2 -5.487 4.08e-08 ***
dm2 9786.05 16383.1 0.5973 0.5503
The ARIMAX equation should be written in
(1+0.0.428580B) (1-L)y_t= 6971.19+(1+0.719310B) a_t - 78779.9dm1 + 9786.05dm2,
(1-0.0.428580B) (1-L)y_t= 6971.19+(1+0.719310B) a_t - 78779.9dm1 + 9786.05dm2or other forms?B is backshift oprator
Thanks a lot
13 years, 8 months

Re: [Gretl-users] changing panel data structure
by Allin Cottrell

On Thu, 10 Feb 2011, Summers, Peter wrote:
> While helping a student sort out a dynamic panel estimation, I
> discovered the following. If I take a data set that's organized
> as stacked time series, change the structure to stacked
> cross-sections, then change it back, the second change isn't
> implemented. I get a box saying no changes were made. Is this
> intended behavior?
That doesn't sound right -- I'll look into it.
> Also, I have a clarification question: if I estimate a dynamic
> panel model with y as the dependent variable, the output lists
> "Dy(-1)" as the first x variable. At first I thought that meant
> the lagged first difference, but reading the dpanel
> documentation it seems like this is actually y(-1). It's the
> lagged level, right?
Well, the model is actually estimated in first differences (with
lagged levels entering as instruments, not as regressors).
Differencing is used to sweep out fixed effects.
But it seems there's a notational inconsistency in that the
dependent variable appears in its own right in the model header
while its lag appears with a "D" for difference.
Allin Cottrell
13 years, 8 months