Function to get the powerset
by Henrique Andrade

Dear Gretl Community,
I really stuck trying to define a function that gives a power set of a
set. Suppose I have a set S:
S = {"A", "B", "C"}
The associated power set, P(S), is:
P(S) = {{ }, {"A"}, {"B"}, {"C"}, {"A", "B"}, {"A", "C"}, {"B", "C"},
{"A", "B", "C"}}
All that I can think by now (shame on me!) is this:
strings S = defarray("A", "B", "C")
scalar P_S_len = 2^nelem(S) # the size of the power set
strings P_S = array(P_S_len) # an array with 8 spaces.
Does anyone have any ideas?
Best,
Henrique Andrade
5 years, 11 months

Reminder: Submission gretl conference Athens
by Sven Schreiber

Dear all,
please remember that today is the official deadline for submitting
proposals for a presentation at the upcoming gretl conference. All
relevant information is on http://www.gretlconference.org/.
By the way, you do not have to have a complete paper at this stage yet:
"All researchers ... are encouraged to submit abstracts".
Thanks and have a good spring weekend,
Sven
7 years, 6 months

New plot for arma models
by Riccardo (Jack) Lucchetti

In the current git version and snapshots, we have a new diagnostic plot,
which IMHO is rather nice: after estimating an arima model, you get a
comparison of the sample periodogram vs the spectrum implied by the model
estimates. For example, try this:
<script>
clear
open fedstl.bin
data houstnsa
series y = 100*sdiff(ln(houstnsa))
arma 2 2 ; y --window
</hansl>
In the "Graphs" menu of the model window you should now have a new item,
called "Spectrum vs sample periodogram", that should (hopefully) produce a
nice plot comparing the two.
Please test. Comments, as usual, welcome.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
7 years, 6 months

Re: [Gretl-users] Gretl-users Digest, Vol 122, Issue 12
by Stefano

Allin forgot the final point
7) and all of us are nicely handed another great addition to our
favorite toolbox
thanks guys!
Stefano
Il 27/03/2017 08:26, gretl-users-request(a)lists.wfu.edu ha scritto:
> Send Gretl-users mailing list submissions to
> gretl-users(a)lists.wfu.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.wfu.edu/mailman/listinfo/gretl-users
> or, via email, send a message with subject or body 'help' to
> gretl-users-request(a)lists.wfu.edu
>
> You can reach the person managing the list at
> gretl-users-owner(a)lists.wfu.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Gretl-users digest..."
>
>
> Today's Topics:
>
> 1. Re: New plot for arma models (Clive Nicholas)
> 2. Re: New plot for arma models (Riccardo (Jack) Lucchetti)
> 3. Re: New plot for arma models (Allin Cottrell)
> 4. Re: New plot for arma models (Clive Nicholas)
> 5. Re: New plot for arma models (Riccardo (Jack) Lucchetti)
> 6. Re: New plot for arma models (Sven Schreiber)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 26 Mar 2017 20:43:41 +0100
> From: Clive Nicholas <clivelists(a)googlemail.com>
> To: r.lucchetti(a)univpm.it, Gretl list <gretl-users(a)lists.wfu.edu>
> Subject: Re: [Gretl-users] New plot for arma models
> Message-ID:
> <CAHs5aThatA_Dmq9oLkPixD4X=bheHtL6gnd=DrrTFrg6gKULEQ(a)mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Confirmed on my Linux Mint 18.3 system after updating to 2017a.
>
> Very good work, Jack!
>
> C
>
> On 26 March 2017 at 11:00, Riccardo (Jack) Lucchetti <r.lucchetti(a)univpm.it>
> wrote:
>
>> In the current git version and snapshots, we have a new diagnostic plot,
>> which IMHO is rather nice: after estimating an arima model, you get a
>> comparison of the sample periodogram vs the spectrum implied by the model
>> estimates. For example, try this:
>>
>> <script>
>> clear
>> open fedstl.bin
>> data houstnsa
>> series y = 100*sdiff(ln(houstnsa))
>> arma 2 2 ; y --window
>> </hansl>
>>
>> In the "Graphs" menu of the model window you should now have a new item,
>> called "Spectrum vs sample periodogram", that should (hopefully) produce a
>> nice plot comparing the two.
>>
>> Please test. Comments, as usual, welcome.
>>
>> -------------------------------------------------------
>> Riccardo (Jack) Lucchetti
>> Dipartimento di Scienze Economiche e Sociali (DiSES)
>>
>> Universit? Politecnica delle Marche
>> (formerly known as Universit? di Ancona)
>>
>> r.lucchetti(a)univpm.it
>> http://www2.econ.univpm.it/servizi/hpp/lucchetti
>> -------------------------------------------------------
>> _______________________________________________
>> Gretl-users mailing list
>> Gretl-users(a)lists.wfu.edu
>> http://lists.wfu.edu/mailman/listinfo/gretl-users
>>
>
>
--
________________________________________________________________________
Stefano Fachin
Professore Ordinario di Statistica Economica
Dip. di Scienze Statistiche
Università di Roma "La Sapienza"
P.le A. Moro 5 - 00185 Roma - Italia
Tel. +39-06-49910834
fax +39-06-49910072
web http://stefanofachin.site.uniroma1.it/
7 years, 6 months

Re: [Gretl-users] I: Dumitrescu-Hurlin test and Granger causality test
by Giuseppe Vittucci

Dear Sven,
yes, you are right :)
Thanks a lot
Giuseppe
On Thu, 2017-03-23 at 18:00 +0000, Giuseppe wrote:
> Dear all,
>
> > I am trying to compute the pairwise Dumitrescu-Hurlin test (a
Granger-causality test for panel data) in gretl.
> > In order to do this, after having run a separate:
> > var # y1 y2
> > one for each cross-sectional unit in the panel, I need to retrieve
the value of the F-test for the null hypothesis that no lags of variable
y2 (y1) are significant in the equation for variable y1 (y2).
> > gretl computes these Granger causality tests and shows them by
default
> > after the command "var", but it seems that this value isn't stored
in any accessor...
> > Is there an easy way to retrieve it?
>
> Not that I'm aware of (and I may be wrong and/or there may be a
function
>
> package for it, although I don't think so), but what about the
following
> workaround:
>
> For a Granger causality test from x on y you don't need to estimate a
> VAR, you only need the equation for y. So I would estimate the single
> equation for y with OLS, including the relevant lags, and then
testing
> Granger causality with the "omit" command. Something like this:
>
> list causelags = lags(p, x) # p is the lag order
> list targetlags = lags(p, y)
> ols y const targetlags causelags
> omit causelags --test-only --silent
> yxteststat = $test
> yxpval = $pvalue
> Of course if you want to test in both directions, you have to do this
workaround again for x on the LHS (possibly with a loop to avoid code
duplication).
>
>
> hth,
> sven
7 years, 6 months

Dumitrescu-Hurlin test and Granger causality test
by Giuseppe Vittucci

Dear all,
I am trying to compute the pairwise Dumitrescu-Hurlin test (a
Granger-causality test for panel data) in gretl.
In order to do this, after having run a separate:
var # y1 y2
one for each cross-sectional unit in the panel, I need to retrieve the
value of the F-test for the null hypothesis that no lags of variable y2
(y1) are significant in the equation for variable y1 (y2).
gretl computes these Granger causality tests and shows them by default
after the command "var", but it seems that this value isn't stored in
any accessor...
Is there an easy way to retrieve it?
Thanks a lot :)
Giuseppe
7 years, 6 months

cannot load documentation
by Stefano

hello, I run into the following problem under Windows 7, Gretl 2016d,
build date 2016-11-19: of all the PDF documentation listed in the Help
menu I can access only the "User's guide". Clicking on all the others
opens a box with the "no entry" roadsign (white band on red background)
and the warning "cURL error 60 (Peer certificate cannot be authenticated
with given CA certificates)"
bye and thanks
Stefano
--
________________________________________________________________________
Stefano Fachin
Professore Ordinario di Statistica Economica
Dip. di Scienze Statistiche
Università di Roma "La Sapienza"
P.le A. Moro 5 - 00185 Roma - Italia
Tel. +39-06-49910834
fax +39-06-49910072
web http://stefanofachin.site.uniroma1.it/
7 years, 6 months

Constraining parameters in NLS estimation
by Alecos Papadopoulos

In mle estimation, we can constrain the permissible space for the
parameters under estimation like this:
mle logl = check ? p*ln(ax) - lngamma(p) - ln(x) - ax : NA
series ax = alpha*x
scalar check = (alpha>0) && (p>0)
params alpha p
end mle
Do we use the same syntax when using nls, non-linear least-squares?
The general difference in syntax that I can see, is that in mle we
define directly the function that is to be maximized, while in nls we
define the regression function... so maybe the syntax for the constraint
should be different?
--
Alecos Papadopoulos
PhD Candidate
Athens University of Economics and Business, Greece
School of Economic Sciences
Department of Economics
https://alecospapadopoulos.wordpress.com/
7 years, 6 months

Gretl conference 2017: Submission deadline extended
by Sven Schreiber

Dear gretl community,
for those of you who haven't submitted anything yet to the upcoming
gretl conference in Athens, June 2nd/3rd (organized by the University of
Patras), please note that the submission deadline has been extended to
at least March 24th.
The gretl conference page (http://www.gretlconference.org/) will soon
reflect this new information. On that page you also have a link to
download the call-for-papers document (also to be updated very soon).
Be aware that you can also still submit an extended abstract (a draft
paper version should be available at the conference).
Please feel free to forward this information to your interested
colleagues and students.
Cheers,
Sven
7 years, 6 months

model numbering
by Allin Cottrell

Hello all,
As you know, gretl automatically gives sequential numbers to models
estimated in a given session. I think this is at least marginally
useful, but it seems to me the details could be improved. The
following script illustrates a couple of points that I think are
problematic:
<hansl>
function matrix ols_coeff (series y, list x)
ols y x
return $coeff
end function
# first session
open data4-10
ols 1 0 2 # "Model 1"
series u = $uhat
ols u 0 2 3 4 --quiet
printf "LM: chi^2(2) = %.1f [%.4f]\n", $trsq, pvalue(X, 2, $trsq)
ols 1 0 2 3 4 # "Model 3"
# second session
open data9-7
ols 1 0 2 # "Model 1"
list X = 2 3 4
ols_coeff(QNC, X) # "Model 2"
ols 1 0 2 3 4 # "Model 2"
</hansl>
In the "first session" the two models that are printed are numbered
1 and 3. It's true a model was estimated between those two, but I'm
inclined to say that when a model is estimated with the --quiet flag
numbering should be skipped. Then the two _visible_ models would be
numbered 1 and 2.
In the "second session" we see that within a function the numbering
of models continues from the last number in the main script, but
then gets reset on exit from the function. So we see two "Model 2"
printouts. In this case I'd suggest that numbering of models be
suspended in function calls. If a function writer wants to print a
label for a given model, the "printf" command is available.
In short, my proposal is that automatic numbering be applied only to
"visible" models in the "main" portion of a gretl script. In many
cases this will be the same as current behavior, but in more complex
cases I think it would be an improvement.
Any thoughts or objections?
Allin Cottrell
7 years, 6 months