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
Bug?
by Andreas Zervas
Dear all,
I am sending this email because lately I have observed changes in the way gretl interacts with octave. I am attaching a simple program for illustrative purposes. I think that such a program should work in any case.
I think it works in linux with no problems (based on earlier experience with more detailed programs to produce graphs).
The issue is that I was able to run this program under windows 7 with earlier gretl and octave versions, in particular it works under gretl version up to 2016d and old octave versions - works with octave 3.4.3. However, under win 7 it does not work with late octave versions - does not work with octave 4.2.1.
In any case, I cannot make it work under win 10, no matter which version of gretl (I have used 1.9.92, 2016d, 2017d) and octave (3.4.3, 4.2.1) I use.
Could you take a look on this issue?
Kind regards,
Andreas Zervas
P.S. I originally started coding with octave because gretl does not offer a facility to produce subplots (graphpage is an imperfect substitute, and accepts only up to 8 graphs I think, while scatters accepts only one variable on each graph). I also did not like the idea of learning another language just to plot, when I am familiar with matlab / octave. Any plans for such a feature?
6 years, 7 months
yahoo_get is back
by Sven Schreiber
Dear users,
a while ago the data retrieval contributed function package
'yahoo_get.gfn' had to be removed because of some interface changes at
Yahoo. Now yahoo_get is back with version 2.0, on the package server as
usual. Thanks to the author Jack Lucchetti.
The caveat: The new version only works under the upcoming gretl version
2018b. If you cannot wait to use yahoo_get, you would have to install a
current development version (compile from git or use a snapshot - doing
that also means that you add to the testing of the current status quo,
which is helpful as well).
You also need to install the helper package 'extra.gfn', as mentioned in
the yahoo_get help.
Enjoy,
Sven
6 years, 7 months
Bar Chart
by Logan Kelly
Hello,
Does anyone have an example of code to create a clustered bar chart, i.e. a chart with multiple series such that the bars do not overlap? It is the not overlapping part that I am failing at.
Thanks,
Logan
6 years, 7 months
Bug?
by Andreas Zervas
I followed Jack's advice, and tried to do the same thing with octave. In win 7 print.m works, but not in win 10, so Sven is right that it is predominantly an octave issue. The test program works in win 7, but as Allin noticed, recent versions of gretl place the graph in dotdir, regardless of octave version used.
Anyway, a multiplot facility would be very useful. I would use it to produce IRFs with confidence intervals, as in Sven's original case for providing multiplot capaiblity.
Thank you all,
Andreas Zervas
6 years, 7 months
Bug?
by Andreas Zervas
I checked the directory you mentioned. Under win 10, gretl 2017d produces an empty plotx.pdf file, using either octave 4.2.1 or 3.4.3. Again under win 10, gretl 1.9.12 and 1.9.92 produce empty pdf files in documents\gretl directory. So to me the big issue does not seem to be the directory, but the empty output file. I would like to remind that this script works under win 7 and older versions of gretl and octave.
Kind regards,
Andreas Zervas
6 years, 7 months
gretl-win32.zip, snapshot
by Allin Cottrell
I've had a report of a problem with the current zipfile version of the
gretl snapshot for Windows, as found at
https://sourceforge.net/projects/gretl/files/snapshots/gretl-win32.zip
What I'm hearing is that this file can be unzipped OK, but then the
gretl.exe inside it won't run on some Windows systems. (And where it
won't run, older versions ran OK.)
Can anyone else who uses the zipfile comment on this? I tried
installing from the current zipfile onto a USB stick under Windows 10
and was able to run gretl.exe OK, so I'm in the dark as to what's
happening here.
Allin Cottrell
6 years, 7 months
AIC with correction for small samples and for bias
by Olivier Montes Ferrer
Greetings, everyone
While working in gretl I noticed that there's no adjustment for the Akaike Information Criterion for small samples nor corrected for bias (I think this one is not that important). Although it´s fairly easy to do it, couldn't help but wonder if it would be possible to create the function for both and maybe include the AIC for small samples in the Model information alongside the other Information Criteria.
Here's a little script for both adjustments of the AIC (after esmimating a model):
#Akaike information criterion corrected for bias
AICbias=-2*$lnl + (2*($ncoeff)*$T/($T-$ncoeff-1))
#AIC for small samples
AICc=$aic+(2*($ncoeff)*($ncoeff+1)/($T-$ncoeff-1))
6 years, 7 months
Re: [Gretl-users] The Greek locale issue Gretl-users Digest, Vol 136, Issue 14
by Alecos Papadopoulos
1) Windows 7 provides to choose a "system locale" that "controls the
language used when displaying text in programs that do not support Unicode".
Mine is set to "Greek(Greece)". This can be found in Control
Panel/Language and Region/Administrative. Is this relevant?
2) Regarding the native controls, I found in the Registry
|HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage the
values ACP 1253 MACCP 10006 OEMCP 737 |
Alecos Papadopoulos
PhD Candidate
Athens University of Economics and Business, Greece
School of Economic Sciences
Department of Economics
https://alecospapadopoulos.wordpress.com/
cell:+30-6945-378680
fax: +30-210-8259763
skype:alecos.papadopoulos
On 22/5/2018 19:00, gretl-users-request(a)lists.wfu.edu wrote:
>> I may have misunderstood, but if by "mixed language filename" we mean
>> something like "Correlated???.inp/.gretl/.gdt",
> You've got it, Alecos, that's what we're talking about: file names
> including characters associated with more than one language. Though
> see below for a refinement of this point.
>
>> I report that my Gretl, gretl 2018a, MS Windows (X86 64) build date
>> 2018-03-17 appears to have no issue with seeing the file name, or with
>> opening by directly double clicking files with mixed language filenames as
>> above and with any of the above extensions, and without Gretl running prior
>> to the double clicking.
>>
>> I have Windows 7 64-bit.
> Thanks, that's very helpful. I guess you are running Windows in Greek,
> or at least using the Windows-1253 "code page" which supports both
> English and Greek characters. The real problem we're working on is not
> exactly "mixed languages" as such but rather "mixed code pages", that is,
> file names which include characters that are not represented in the
> active Windows code page. Examples would be Greek or Cyrillic characters
> when your code page is set to Western European (CP 1252). I think this
> is the case for Periklis, who reported the problem.
>
> Allin
6 years, 7 months
Re: [Gretl-users] The Greek issue
by Alecos Papadopoulos
I may have misunderstood, but if by "mixed language filename" we mean
something like "CorrelatedΓξΔ.inp/.gretl/.gdt",
I report that my Gretl, gretl 2018a, MS Windows (X86 64) build date
2018-03-17 appears to have no issue with seeing the file name, or with
opening by directly double clicking files with mixed language filenames
as above and with any of the above extensions, and without Gretl running
prior to the double clicking.
I have Windows 7 64-bit.
Alecos Papadopoulos
PhD Candidate
Athens University of Economics and Business, Greece
School of Economic Sciences
Department of Economics
On 21/5/2018 19:00, gretl-users-request(a)lists.wfu.edu wrote:
> So we're wondering: Does double-clicking on a "mixed language"
> filename now work for you?
6 years, 7 months