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
6 years, 1 month
retrieve seed
by Ioannis A. Venetis
Hello all,
Is there a way to retrieve the random seed number? (with a get or print
command just like set works for ... setting?)
Say I run the same inp file for a few times without (pre-)setting the
seed and I "like" the pseudo properties obtained from a particular run
(this can happen or be particularly true in small samples).
Thank a lot.
Yiannis
7 years, 5 months
Retired package "genr_dates.gfn": equivalent functionality
by Sven Schreiber
Hi everybody,
the function package genr_dates.gfn from 2013 has just been retired
(removed from the package server), because it had some technical issues.
If you relied on that package, here are some tips on how to achieve the
same results:
For getting a series with the number of the quarter (or month), in
recent gretl versions you only have to do:
series q = $obsminor
(Similarly with daily data and number of day, use the accessor $obsmicro.)
Dummy variables for various time frequencies can be obtained with the
builtin seasonals() function (also from the menus).
If you want dummies that are different from the periodicity of the
dataset (not used very often I think), then you can create something
like "series Y = $obsmajor" and then for example from the menu choose
"add dummies for discrete variables". (Equivalently in script: list
yeardum = dummify(Y); you may have to explicitly declare Y to be
discrete -- go to its attribute window and tick the corresponding box;
or do "discrete Y" as a command.)
If you have any further questions, this is the right place to ask!
thanks,
sven
7 years, 5 months
Re: [Gretl-users] Violin plot with box plot
by cociuba mihai
For what I understand from the example provided by gnuplot doc they
actually re-plot the box images over the violin ones.
################gnuplot code#########################
set title 'Superimposed violin plot and box plot'
set style fill solid bo -1
set boxwidth 0.075
set errorbars lt black lw 1
replot $viol2 using (1):2 with boxplot fc "white" lw 2, \
$viol1 using (3):2 with boxplot fc "white" lw
###########################################################
Great idea with the package!
Mihai
On Wed, Jun 21, 2017 at 3:37 PM, <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: boxplot of matrix (Schaff, Frederik)
> 2. Violin plot with box plot (Schaff, Frederik)
> 3. Re: Violin plot with box plot (Logan Kelly)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 21 Jun 2017 03:19:53 +0000
> From: "Schaff, Frederik" <Frederik.Schaff(a)fernuni-hagen.de>
> To: "r.lucchetti(a)univpm.it" <r.lucchetti(a)univpm.it>, Gretl list
> <gretl-users(a)lists.wfu.edu>
> Subject: Re: [Gretl-users] boxplot of matrix
> Message-ID:
> <94DD4923F1D1534189901CE4E97BB72E4F42179F@Ymir.
> buerokommunikation.fernuni-hagen.de>
>
> Content-Type: text/plain; charset="us-ascii"
>
> > > Dear gretl users,
> > >
> > > I have created a matrix with 4 columns and 1000 rows and now I'd like
> > > to use the boxplot command on it, but it is (despite it should) not
> > > working... what am I getting wrong? Here is a MWE:
> > >
> > > ----------
> > > nulldata 1000
> > > matrix A=zeros(1000,4)
> > > loop for r=1..1000
> > > loop for c=1..4
> > > A[r,c]= randgen1(u,0,c)
> > > endloop
> > > endloop
> > >
> > > boxplot --matrix=A --output=display
> > > ------------
> > > Error msg:
> > > ? boxplot --matrix=A --output=display
> > > Command has insufficient arguments
> > >
> >
> > You have to tell boxplot which columns of the matrix you want plotted. In
> > your case, I suspect that what you want is
> >
> > <hansl>
> > boxplot 1 2 3 4 --matrix=A --output=display </hansl>
> >
> > Also: you may want to use the --quiet option for loops ;)
> >
>
> That's it, many thanks! The quick-help documentation needs an update than,
> I guess:
>
> "Generally, the argument varlist is required, and refers to one or more
> series in the current dataset (given either by name or ID number). But if a
> named matrix is supplied via the --matrix option this argument becomes
> optional: by default a plot is drawn for each column of the specified
> matrix."
>
> To me this implies that I do not need to specify the columns. This option
> is not even mentioned.
>
> -Frederik
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 21 Jun 2017 12:23:43 +0000
> From: "Schaff, Frederik" <Frederik.Schaff(a)fernuni-hagen.de>
> To: "Gretl list (gretl-users(a)lists.wfu.edu)"
> <gretl-users(a)lists.wfu.edu>
> Subject: [Gretl-users] Violin plot with box plot
> Message-ID:
> <94DD4923F1D1534189901CE4E97BB72E4F421C35@Ymir.
> buerokommunikation.fernuni-hagen.de>
>
> Content-Type: text/plain; charset="us-ascii"
>
> Hello,
>
> some time back, Jack helped me produce a violin plot and suggested to make
> a function of it. Now I am trying to do so. However, I would like to add a
> box-plot "within" the violin, because the extreme points (e.g.) are not
> correctly displayed in a violin plot. See here for an original gnuplot
> examples: http://gnuplot.sourceforge.net/demo_cvs/violinplot.html
>
> The "template" script I have attached is working for generating a box-plot
> or a violin plot, but I have no idea how I can merge them.
>
> Any idea? Is it possible to somehow "see" the internals of the boxplot
> function? For then I should be able to copy & paste things such that it
> works.
>
> Many thanks
> Frederik
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.wfu.edu/pipermail/gretl-users/
> attachments/20170621/729a229e/attachment-0001.html>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: violin_with_box.inp
> Type: application/octet-stream
> Size: 2294 bytes
> Desc: violin_with_box.inp
> URL: <http://lists.wfu.edu/pipermail/gretl-users/
> attachments/20170621/729a229e/attachment-0001.obj>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 21 Jun 2017 12:37:08 +0000
> From: Logan Kelly <logan.kelly(a)uwrf.edu>
> To: "'Gretl list'" <gretl-users(a)lists.wfu.edu>
> Subject: Re: [Gretl-users] Violin plot with box plot
> Message-ID:
> <DM5PR03MB285753E110EFB7D13420933784DA0@DM5PR03MB2857.
> namprd03.prod.outlook.com>
>
> Content-Type: text/plain; charset="us-ascii"
>
> Apologies for a superfluous post, but those plots are beautiful.
>
> Logan
>
> From: gretl-users-bounces(a)lists.wfu.edu [mailto:gretl-users-bounces@
> lists.wfu.edu] On Behalf Of Schaff, Frederik
> Sent: Wednesday, June 21, 2017 7:24 AM
> To: Gretl list (gretl-users(a)lists.wfu.edu) <gretl-users(a)lists.wfu.edu>
> Subject: [Gretl-users] Violin plot with box plot
>
> Hello,
>
> some time back, Jack helped me produce a violin plot and suggested to make
> a function of it. Now I am trying to do so. However, I would like to add a
> box-plot "within" the violin, because the extreme points (e.g.) are not
> correctly displayed in a violin plot. See here for an original gnuplot
> examples: http://gnuplot.sourceforge.net/demo_cvs/violinplot.html
>
> The "template" script I have attached is working for generating a box-plot
> or a violin plot, but I have no idea how I can merge them.
>
> Any idea? Is it possible to somehow "see" the internals of the boxplot
> function? For then I should be able to copy & paste things such that it
> works.
>
> Many thanks
> Frederik
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.wfu.edu/pipermail/gretl-users/
> attachments/20170621/1882dbd9/attachment.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 125, Issue 10
> ********************************************
>
7 years, 5 months
boxplot of matrix
by Schaff, Frederik
Dear gretl users,
I have created a matrix with 4 columns and 1000 rows and now I'd like to use the boxplot command on it, but it is (despite it should) not working... what am I getting wrong? Here is a MWE:
----------
nulldata 1000
matrix A=zeros(1000,4)
loop for r=1..1000
loop for c=1..4
A[r,c]= randgen1(u,0,c)
endloop
endloop
boxplot --matrix=A --output=display
------------
Error msg:
? boxplot --matrix=A --output=display
Command has insufficient arguments
The only thing I could find about this was a rather old post by Sven: http://lists.wfu.edu/pipermail/gretl-devel/2009-April/001894.html
Any help is appreciated
Frederik
7 years, 5 months
Violin plot with box plot
by Schaff, Frederik
Hello,
some time back, Jack helped me produce a violin plot and suggested to make a function of it. Now I am trying to do so. However, I would like to add a box-plot "within" the violin, because the extreme points (e.g.) are not correctly displayed in a violin plot. See here for an original gnuplot examples: http://gnuplot.sourceforge.net/demo_cvs/violinplot.html
The "template" script I have attached is working for generating a box-plot or a violin plot, but I have no idea how I can merge them.
Any idea? Is it possible to somehow "see" the internals of the boxplot function? For then I should be able to copy & paste things such that it works.
Many thanks
Frederik
7 years, 5 months
AIC in ADF test lag selection
by Matteo Pelagatti
Dear Gretl users and developers,
I noticed that the AIC used in the lag selection procedure of the ADF test
is different from the one reported under the regression results. Also, the
lag selection would be different if based on the regression's AIC.
My questions are:
"What formula is used for the selection procedure?",
"Why does it differ from the usual one?"
Thanks and best wishes,
Matteo
7 years, 5 months
Estimate dynamic panel regressions
by Carla Fernandes
Good morning for everybody,
I would like to know:
- what is the difference between estimate dynamic panel regressions data with and without the command “--dpdstyle”.
- What means: matrix H according OX/DPD? in the context of estimation dynamic panel data regressions
Thank you
Carla.
___________________________________________
Carla Fernandes
Professora Adjunta
Universidade de Aveiro
Instituto Superior de Contabilidade e Administração
R. Associação Humanitária dos Bombeiros de Aveiro
3810-500 Aveiro
Portugal
Telefone: + 351 234 380 110 / Fax: + 351 234 380 111
e-mail: carla.fernandes(a)ua.pt
7 years, 5 months
Issue with openBLAS, openMPI and pthreads
by Artur Tarassow
Dear all,
just by chance, I've found the following gretl warning:
<gretlcli>
*** Warning ***
*
* gretl is built using OpenMP, but is linked against
* OpenBLAS parallelized via pthreads. This combination
* of threading mechanisms is not recommended. Ideally,
* OpenBLAS should also use OpenMP.
</gretlcli>
I am not sure how to respond to this correctly.
Usually I compile gretl on ubunty by running
<terminal>
./configure --enable-build-doc --enable-openmpi
</terminal)
and get the output
<configure>
Installation path: /usr/local
Use readline library: yes
Use gnuplot for graphs: yes
Use pdflatex for typesetting: yes
Use libgsf for zip/unzip: no
sse2 support for RNG: yes
OpenMP support: yes
MPI support: no
AVX support for arithmetic: yes
Build with GTK version: 2.0
Build gretl documentation: yes
Use Lucida fonts: no
Build message catalogs: yes
Build gretl addons: no
X-12-ARIMA support: yes
TRAMO/SEATS support: yes
libR support: yes
ODBC support: no
JSON parsing support: yes
Experimental audio support: no
Use xdg-utils in installation: if DESTDIR not set
LAPACK libraries:
-llapack -lblas -lgfortran
</configure>
The package libopenmpi-dev is installed.
$sysinfo yields
<sysinfo>
bundle anonymous:
nproc = 4
blascore = Haswell
hostname = atdesktop
os = linux
mpi = 0
blas = openblas
omp_num_threads = 4
omp = 1
blas_parallel = pthreads
mpimax = 0
wordlen = 64
</sysinfo>
Any thoughts? Thanks
Artur
7 years, 5 months