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
1 year, 11 months

Nonlinear Time Series
by Agustin Alonso

Dear Sirs:
During the past 2 years I have not used Gretl, because of that, I would like
to know if the package has now the facilities for studing nonlinear time
series.
Thanking you for your attention, I am
Sincerely yours
Agustin Alonso
Prof. of Econometrics
Real Centro Universitario "Escorial-Maria Cristina"
San Lorenzo de El Escorial(Madrid) Spain
3 years, 8 months

ADF test: Printing p-values
by Mohamed Abdelrahim

Hello,
I would like to run ADF test on a stationary ARMA process with 100 repetitions. How can I report the p-value for every repetition instead of just the last p-value or a mean of p-values? I want to write a code to calculate the proportion that the p-value is above/below certain significance levels.
Thank you in advance.
3 years, 8 months

nonparametric correlation
by Allin Cottrell

A couple of points that anyone interested in nonparametric
statistics might want to note. These points pertain to git and
snapshots.
Following some off-list discussion with Jack L and Sven S,
1) in the GUI, our nonparametric (rank) correlation options have
been moved from under /Models/Robust estimation to
/Tools/Nonparametric tests. I agree with Sven that they may be more
likely to be found in their new location. However, loess and
Nadaraya-Watson regression remain under the Models menu.
2) We now have an npcorr() function that lets you grab the
correlation measure, test statistic and p-value for rank correlation
(either Kendall's tau, version b, or Spearman's rho). It's
documented in the current Function reference.
Allin
3 years, 9 months

renaming of some doc files
by Allin Cottrell

This will mostly be noteworthy for translators, but I'm sending it
to the users list in case it also impinges on people building gretl
from source. (At minimum, you will have to rerun the configure
script.)
In following up on the recent Portuguese translation of the gretl
Function Reference, I've been cleaning up and fixing bit-rot in the
handling of our internationalized help files. The latest step in
this, which I'm about to push to git, has involved renaming a few
source files and also generated help files, in the interest of
up-to-dateness and (hopefully) a little more clarity on what these
files are.
Here are the source renamings:
gretl_commands.xml -> gretl_commands_en.xml
genr_funcs.xml -> gretl_functions_en.xml
genr_funcs.dtd -> gretl_functions.dtd
genr_funcs_it.xml -> gretl_functions_it.xml
genr_funcs_pt.xml -> gretl_functions_pt.xml
and the renaming of generated help files:
genrcli.hlp -> gretl_cli_fnref.en
genrgui.hlp -> gretl_gui_fnref.en
gretlcli.hlp -> gretl_cli_cmdref.en
gretlcmd.hlp -> gretl_gui_cmdref.en
gretlgui.hlp -> gretl_gui_help.en
(For translations, substitute "it", "pt" or whatever for "en".)
The renamings necessarily broke (in minor ways) some translated
files (updates needed for the DTD reference in some XML files, plus
translations of helpfile names in some .po files). I think I've
fixed the breakage -- apologies if there are any remaining problems.
Those building gretl from source may wish to delete the obsoleted
generated help files, as in
rm -f $prefix/share/gretl/*.hlp*
--
Allin Cottrell
Department of Economics
Wake Forest University
3 years, 9 months

Re: [Gretl-users] Random selection from two data series and blending
by George Matysiak

Sven,
Thanks for message.
Noted what you say about the emails. With this email, I'm using the reply
facility in Google Mail, and have altered the heading subject - hope this
is better.
Thanks for the suggestions re random sampling - will give it a try.
Best,
George
On 14 December 2016 at 18:00, <gretl-users-request(a)lists.wfu.edu> wrote:
> 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: Random selection from two data series and blending
> (Sven Schreiber)
> 2. Re: Adding data values on the fly (George Matysiak)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 13 Dec 2016 18:16:53 +0100
> From: Sven Schreiber <svetosch(a)gmx.net>
> To: gretl-users(a)lists.wfu.edu
> Subject: Re: [Gretl-users] Random selection from two data series and
> blending
> Message-ID: <55a014df-93df-8e23-2044-59039eca96ba(a)gmx.net>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> Am 13.12.2016 um 17:30 schrieb George Matysiak:
> > I have a related question. I have undated data in two series x and y,
> > with 50 observations in each. There is no overlap in their respective
> > observation numbers i.e. x runs from 1-50 and y from 51-100. I would
> > like to draw a random sample from each, say 20, and combine the two
> > random samples into a series consisting of the 40 observations. I've
> > played around with this but can't quite seem to get there. Any
> > suggestions would be very welcome. Thanks.
>
> George, first it would be helpful if you could quote a few lines of the
> original post to which you're referring when you write things like
> "related". (Also, your posts somehow break the mailing thread structure,
> they aren't recognized as replies to something earlier. Which makes it
> even harder to understand to what you're referring. That's probably the
> fault of your mail program; which one are you using?)
>
> Anyway, you could use the resample() function combined with a bunch of
> sample (smpl) restrictions to get the desired sample lengths. This is
> also in the menus I think under the "Sample" main menu (draw with
> replacement).
>
> Perhaps more advanced and for scripting use could be the use of
> mrandgen(i,< ...>) to produce random integers to be used as index
> numbers for drawing from the series.
>
> hth,
> sven
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 13 Dec 2016 19:02:27 +0100
> From: George Matysiak <gmatysiak(a)gmail.com>
> To: gretl-users(a)lists.wfu.edu
> Subject: Re: [Gretl-users] Adding data values on the fly
> Message-ID:
> <CAEWMk7s=ciQ4gRFVuaYkFYEv+so+H89_Jmxt0JEosd_mu4D0bA@mail.
> gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Sven,
>
> This is my script:
>
> # Projecting levels value of x1 for 3 periods ahead, 2016-2018
>
> Dataset addobs 3
>
> scalar x1_GROWTH= 5 # Annual Percentage Growth
>
> genr x1["2016"]= (1+x1_GROWTH/100)*x1["2015"]
>
> genr x1[2017"]= (1+x1_GROWTH/100)*x1["2016"]
>
> genr x1["2018"]= (1+x1_GROWTH/100)*x1["2017"]
>
> fcast 2016 2018 variable_name
>
> The last x1 value is for 2015 and these generated x1 values are then put
> into an existing series x1.
>
> These are your x1 values. I could simply change the scalar value to obtain
> a different scenario, say x2 values. I wasn't sure how to save the
> different scenario values, x2, as they would overwrite the previous values
> in the x1 scenario values. Hope that makes sense.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.wfu.edu/pipermail/gretl-users/
> attachments/20161213/8633c06e/attachment-0001.html>
>
> ------------------------------
>
> _______________________________________________
> Gretl-users mailing list
> Gretl-users(a)lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users
>
> End of Gretl-users Digest, Vol 119, Issue 15
> ********************************************
>
3 years, 9 months

Re: [Gretl-users] Adding data values on the fly
by George Matysiak

Sven,
This is my script:
# Projecting levels value of x1 for 3 periods ahead, 2016-2018
Dataset addobs 3
scalar x1_GROWTH= 5 # Annual Percentage Growth
genr x1["2016"]= (1+x1_GROWTH/100)*x1["2015"]
genr x1[2017"]= (1+x1_GROWTH/100)*x1["2016"]
genr x1["2018"]= (1+x1_GROWTH/100)*x1["2017"]
fcast 2016 2018 variable_name
The last x1 value is for 2015 and these generated x1 values are then put
into an existing series x1.
These are your x1 values. I could simply change the scalar value to obtain
a different scenario, say x2 values. I wasn't sure how to save the
different scenario values, x2, as they would overwrite the previous values
in the x1 scenario values. Hope that makes sense.
3 years, 9 months

Re: [Gretl-users] Random selection from two data series and blending
by George Matysiak

I have a related question. I have undated data in two series x and y, with
50 observations in each. There is no overlap in their respective
observation numbers i.e. x runs from 1-50 and y from 51-100. I would like
to draw a random sample from each, say 20, and combine the two random
samples into a series consisting of the 40 observations. I've played around
with this but can't quite seem to get there. Any suggestions would be very
welcome. Thanks.
**
3 years, 9 months

using cum() for series with NAs
by Artur T.

Dear all,
I stumbled over the following issue:
<hansl>
nulldata 3
series x = {1,0,1}
x = zeromiss(x)
x # as expected
x = cum(x)
x # shouldn't it be: 1|NA|2 ?
</hansl>
Is it intended that NAs break the cumulation of values by cum(), or is
it a bug?
Best,
Artur
3 years, 9 months