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, 2 months
issue adding an additional function to an existing package
by Artur Tarassow
Dear all,
I experienced this issue already in the past and I think it was also
discussed a while ago here in the forum. I still have problems to add a
new function to an existing package. To illustrate the example, I
complied the attached pdf trying to add the function DrawLoss2().
Until today, as a workaround, I completely re-created the package but of
course this is quite annoying and I am sure not intended :-)
Hope somebody could help with the issue.
Best,
Artur
7 years, 9 months
json support ubuntu 16.10
by John C Frain
I have installed Ubuntu 16.10 and am trying to install gretl from git. The
instruction
./configure --prefix=/home/frainj/usr --enable-build-doc
leads to the following output.
The json-glib-1.0 library was not found, or the version found
was not new enough. While we recommend including JSON support
you can disable this by using the option --disable-json when
running configure.
As far as I can determine the json libraries are installed the output of
dpkg --status is as follows
frainj@frainj-Aspire-One-753:~$ sudo dpkg --status libjson-glib-1.0-0
Package: libjson-glib-1.0-0
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 187
Maintainer: Ubuntu Developers <ubuntu-devel-discuss(a)lists.ubuntu.com>
Am I missing something or must I compile without json support.
John C Frain
3 Aranleigh Park
Rathfarnham
Dublin 14
Ireland
www.tcd.ie/Economics/staff/frainj/home.html
mailto:frainj@tcd.ie
mailto:frainj@gmail.com
7 years, 10 months
I can't import data from Excel
by HEBERT SUAREZ CAHUANA
I use ubuntu linux and I install Gretl 2016.d but I don't have option to
import data from Excel. I don't have option to import from menu file/open
file....
Many thanks.
--
Hebert Suarez Cahuana
Secretario del Departamento de Economía
Universidad Nacional de San Agustín
Arequipa-Perú
"*Ninguna nación llegó a la ruina por el libre comercio*" Benjamin Franklin
7 years, 10 months
loop, string substitution and varname from list
by Schaff, Frederik
Hello everyone,
I am constructing a set of xy plots in a loop, using a predefined list of variables for the plots. I'd like the names of the plots to include the variables names. Here is a MWE, including some comments on what I tried and did not work:
-------------------
#Loop through list of vars and create xy plots
nulldata 100
setobs 1 1 --cross-section
x_1 = uniform()
x_2 = uniform()
y_1 = uniform()
y_2 = uniform()
list xs = x*
list ys = y*
loop for (i=1; i<=nelem(xs); i++)
$i <- gnuplot xs[i] ys[i] #works
#printf "%s", varname(xs[i]) #works not -- error msg not of help
#string name = varname(xs[i]) #works not -- error msg indicates series ID needed
#string name = "@xs[i]" #works not either -- error msg not of help
string name = "name_$i" #works
@name <- gnuplot xs[i] ys[i] #works
endloop
-------------------
Any idea how I can make this work?
Kind Regards,
Frederik
7 years, 10 months
When matrix stands taller than the sample
by Alecos Papadopoulos
I am running simulations to examine empirical size distortions of
hypothesis tests. So I use a loop construct. My statistic comes from NLS
or MLE estimation, so I cannot use the --progressive mode of the loop
command. I sidestep this by using a count-loop and by storing the
obtained statistics into a matrix.
I typically repeat the loop 1000 times.
But when I want to examine small sample sizes, say 100 observations, I
end up with a matrix that has 1000 rows saved in a session that has
sample size 100.
In order to proceed with the work at hand, I need to transform the
matrix into series. But I cannot do that since the row-length of the
matrix is greater than the size of the sample in the session, and as far
as I know, one cannot increase the sample size in a session.
The only thing I know to do is to export the matrix into a spreadsheet,
and re-load it as a series to a new gretl session that will then take as
sample size the row-length of the former.
I just wanted to ask, is there any other way?
--
Alecos Papadopoulos
PhD Candidate
Athens University of Economics and Business, Greece
School of Economic Sciences
Department of Economics
https://alecospapadopoulos.wordpress.com/
7 years, 10 months
Panel data: xlsx & csv
by Henrique Andrade
Dear Allin,
I'm trying to analyze panel data for the first time using Gretl and I
realized something (IMHO) weird. Gretl can open a csv file with
non-numeric values but can't do that using xslx file. Please take a
look at the commands (and the files attached):
open panel.xlsx --coloffset=1 --rowoffset=1 # not working
open panel.csv # working
Is it possible to circumvent that behavior and open panel data stored
in xlsx files?
Um abraço,
Henrique Andrade
7 years, 10 months
Rolling correlation between time series
by Tomas Nilsson
Is there an option to compute the rolling correlation between multiple
time series? I'm seeing some mentioning on this topic in 2016 between
Fernando and Sven but not sure what happened to it. Thanks
7 years, 10 months
git issue
by Artur T.
Dear all,
for some reason I obtain the following issue with git when trying to
update to the latest version using gut:
<gitout>
at@ATLaptop:~$ cd gretl-git && git pull && ./configure --enable-openmp
--enable-build-doc && make clean && make -j4 && make pdfdocs && sudo
make install
remote: Counting objects: 111, done.
remote: Compressing objects: 100% (78/78), done.
remote: Total 78 (delta 59), reused 0 (delta 0)
Entpacke Objekte: 100% (78/78), Fertig.
Von git://git.code.sf.net/p/gretl/git
f6ce406..7be8ed6 master -> origin/master
Aktualisiere a331d61..7be8ed6
error: Your local changes to the following files would be overwritten by
merge:
po/bg.po
Please commit your changes or stash them before you merge.
</gitout>
I have no idea why git thinks that I have changed anything locally which
I haven't...
Best,
Artur
7 years, 10 months
johansensmall.gfn replaces coint2finite.gfn
by Sven Schreiber
Dear cointegration aficionados among the gretl users,
this is to inform you that the contributed function package coint2finite
(by Andreas Noack Jensen and myself) has been renamed to johansensmall,
along with an update to version 2. The new name hopefully makes it
clearer that the package does the cointegration rank test (Johansen
test) for small samples.
The bootstrap algorithm in that package has been rewritten and also a
little extended, and I think also one or two noticeable bugs have been
squashed along the way. So I wouldn't be surprised if you get different
results in some cases. Notice that the function interface has slightly
changed (but that's documented).
The old package coint2finite will now be removed from the package
server. The companion package coint2rec, which does cointegration
stability analysis, is still there and unchanged.
If anything remains unclear, please ask.
Cheers,
sven
7 years, 10 months