text search result off-window (bottom)
by Sven Schreiber
Hi,
this is not a new bug / odd behavior, but perhaps it's not on the radar
anymore, because it might be a Windows-only thing. It still happens
"often" (not always), that when you search for a word in the script
editor, the window content is moved such that the next match is just in
the next line below the bottom of the window, so not visible without
scrolling further.
This is with recent snapshots and releases, and I think both on Windows
7 and 10.
Maybe tricky to fix, and of course not release-critical.
thanks,
sven
6 years, 5 months
Bug (?) in hi-freq lag counting of midas
by Sven Schreiber
Hi,
I think a midasreg with a 'mdsl' term may get the included lags wrong in
the information that is printed in the output.
For example, as a benchmark I have the following (shortened) line:
midasreg dep ... ; ... mds(dO, 2,3 , 2, theta)
So my high-frequency lags of dO go from 2 to 3, and indeed gretl tells
me just that in the output:
MIDAS list dO, high-frequency lags 2 to 3
HF_slope2 −1.78684e-05 1.97184e+010 0.0000 1.0000
Beta1 1.00000 1.22905e+030 0.0000 1.0000
Beta2 2.00000 1.22905e+030 0.0000 1.0000
Fine -- I know there are numerical problems here but that's not the
issue right now. I can get the same result by defining a lag list dOL
with hi-freq lags 2 to 3, and then using mdsl:
midasreg dep...; ... mdsl(dOL, 2, theta)
This produces the same result numerically which makes me confident that
I defined the dOL list correctly; however, gretl no tells me the lags
would be from 1 to 2 instead:
MIDAS list dOL, high-frequency lags 1 to 2
HF_slope2 −1.78684e-05 1.97184e+010 0.0000 1.0000
Beta1 1.00000 1.22905e+030 0.0000 1.0000
Beta2 2.00000 1.22905e+030 0.0000 1.0000
So this looks like a off-by-one bug to me. (Latest snapshot BTW.)
Thanks,
sven
6 years, 11 months
Bug in princomp() (?)
by Sven Schreiber
Hi,
perhaps there's a bug in princomp in the case of reduced rank. See this
illustration:
<hansl>
matrix A = { 0, 0, 0, 0; \
0.0000 , 2.2790, -1.5619, -1.6955; \
0.0000 , -1.5619 , 1.2914 , 1.6958 ; \
0.0000 , -1.6955 , 1.6958 , 2.6103 }
eval mcov(A) # OK
eval mcorr(A) # OK (correct NAs)
matrix v = {}
eval eigensym(A, &v) # OK
print v
eval princomp(A, 1, 1) # try cov; only gives NAs
eval princomp(A, 1) # fails
</hansl>
In my understanding a PC is basically just an eigenvector of the
covariance (or correlation) matrix, so if eigensym(A) is able to
calculate some eigenvectors for the non-zero eigenvalues, so should be
princomp(), no?
BTW, the error message for the last line is "syntax error", which is
also wrong I think.
Thanks,
sven
7 years, 1 month
trivial GUI issue (plot button)
by Sven Schreiber
Hi,
in a time series dataset, when I double click on a variable and get the
window with the values, there's a button at the top to get a (time
series) plot. However, the icon shows a little boxplot (aka
box-and-whiskers), which personally I find very misleading. For some
time I even thought the direct plot button was gone.
cheers,
sven
7 years, 1 month
gretl's CSV reader and categorical data
by Allin Cottrell
This is quite long. Impatient readers who are nonetheless disposed
to help with gretl development: please skip to the "Requests"
section at the end!
Gretl's CSV reader is, I think, pretty good at this point: it can
handle most "CSV" data (in a broad sense) that you throw at it, so
long as the input is not too badly broken. However, I've recently
discovered that there is a potentially important problem, and I'm
trying to fix it.
The problem: some time ago we decided to ease the task of parsing
"CSV" by deleting quotation marks from each line of input. (We can
and do recognize string-valued input, but only by determining that
it cannot be parsed as numeric.) Quotation is sometimes used
inconsistently and arbitrarily in "CSV" files (in which case we
don't lose anything by the policy just mentioned), but sometimes
it's used in a systematic way to indicate columns that present
categorical data (per R, "factors") even though the values are
apparently numeric. I've come across such cases in the American
Household Survey (AHS), and also R's write.csv() uses quotation of
integer values to indicate factors.
If you're working with a fairly small, and adequately documented,
dataset in CSV form this isn't a big problem; it's easy enough to
figure out which columns are categorical, and treat them accordingly
(e.g. by using "dummify"). But given a dataset with hundreds of
variables (e.g. AHS), and maybe not all that well documented,
figuring out what's categorical and what's not can be a real
headache.
So, I've been working on a revision of our CSV reader in which we
"respect" quotation in this sense: we do not delete quotation marks
in CSV input, and if it turns out that all the values in a given
column are quoted integers, we take that column to be an encoding of
a categorical variable. To that end I've introduced a new attribute
of gretl series, namely "coded". This is set on input from CSV,
where applicable, and is preserved in write/read of gdt and gdtb
data files.
At present, the revised CSV reader is invoked if and only if you add
the option flag --respect-quotes when opening a CSV file (which has
to be done via console or scripting), as in
open foo.csv --respect-quotes
My goal is that once this whole thing has stabilized, that is
removed as an option and becomes the default.
The "coded" attribute is represented in the gretl GUI, under "Edit
attributes", via the checkbox labeled "Numeric values represent an
encoding". It's also settable (and removable, in case it has been
wrongly imputed), via the "setinfo" command:
setinfo <series-name> --coded # add "coded" attribute
setinfo <series-name> --numeric # remove "coded" attribute
But note that the condition for adding the "coded" attribute is that
(a) the series is purely integer-valued and (b) it's not just a 0/1
dummy. That's because this attribute is intended to tell gretl that
the series needs to be "dummified" for econometric use, which is
obviously not the case for a series that's already a binary dummy.
What are the consequences when a series is taken to be "coded"?
(Clearly, if there are no practical consequences this is all a waste
of time.) Well, that's work in progress, but the idea is that you
can modify a regression list to automatically "dummify" any coded
series that it might contain. There's a first pass at this in gretl
git which is illustrated by the following:
<hansl>
open foo.csv # may contain coded series?
list X = * # complete list of series
X -= y # remove the dependent variable "y" from X
X = dummify(X, -999)
ols y X
</hansl>
The use of a second argument of -999 to dummify() is, of course,
just a temporary hack. What it means at present is: replace any
"coded" series in the first (list) argument by their
"dummifications" (lists of per-value binary dummies, omitting the
first value in each encoding). For future reference, this hack
should be replaced by either a new function, or an overloading of
dummify() with a special second argument, or maybe an option for
estimation commands which calls for pre-processing of the list of
independent variables as described.
Requests:
1) I'd be grateful if people who work with CSV data could try
importing using the --respect-quotes option to "open" in git and
snapshots. I'm particularly interested in any cases where the
original CSV reader works OK but the new version fails; any such
cases will have to be fixed before we can proceed.
2) I'd also be grateful if people could test the dummify(list, -999)
hack. But note, this won't do anything (or at least, shouldn't do
anything!) if list contains no "coded" series. And you won't have
any such series in your dataset unless you import from suitable CSV,
or mark any suitable series via the "setinfo" command or the GUI
"Edit attributes" dialog (see above).
Allin
7 years, 1 month
gretl main webpage
by Allin Cottrell
I've just recently added Facebook and Twitter links to the main
gretl page. I also removed the "HTML 4" validation icon, since (not
surprisingly) the Facebook link code doesn't validate as HTML 4.
Translators of the gretl website may wish to follow suit. The magic
formulae can be found in the English-language page template,
doc/website/template/index_pat.html
in gretl git.
But please note the necessity of the javascript stanza right after
the <body> tag if the Facebook link is to work.
Allin
7 years, 1 month
GUI tweak
by Riccardo (Jack) Lucchetti
Often, I find myself thinking that it'd be nice to have the working
directory displayed somewhere in the main window of the GUI client.
For example, a suitable place could be an extra line underneath (or
possibly above) the currently open dataset. Or maybe, on the same line, to
the right. Or alternatively, as a second status line at the bottom.
Opinions?
-------------------------------------------------------
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, 1 month
question-mark bug fixed
by Allin Cottrell
Today's snapshot (the same code as in the 2017c release) fixes a
recently introduced bug that I found in regression-testing for the
release. Namely, the new facility of using '?' as a wildcard
(matching any single character) when defining a list had broken the
use of the ternary operator "? :" in list definition. Now both uses
of the question mark should be handled correctly.
Allin
7 years, 1 month
Installing -gretl- chokes on build dependencies step
by Clive Nicholas
I'm getting this choker on my newly-built Linux Mint 18.2 desktop after
several attempts this week:
[bash]
clive@climate ~ $ sudo apt-get install texlive-latex-extra
texlive-fonts-recommended texlive-fonts-extra git
[...]
clive@climate ~ $ git clone git://git.code.sf.net/p/gretl/git gretl-git
Cloning into 'gretl-git'...
remote: Counting objects: 153006, done.
remote: Compressing objects: 100% (32161/32161), done.
remote: Total 153006 (delta 123847), reused 148682 (delta 120378)
Receiving objects: 100% (153006/153006), 174.65 MiB | 2.76 MiB/s, done.
Resolving deltas: 100% (123847/123847), done.
Checking connectivity... done.
clive@climate ~ $ cd gretl-git
clive@climate ~/gretl-git $ sudo apt-get build-dep gretl
[sudo] password for clive:
Reading package lists... Done
E: Unable to find a source package for gretl
clive@climate ~/gretl-git $ apt-get build-dep gretl
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission
denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you
root?
[/bash]
gretl-2016a is available for quick download from the repository, so this
makes no sense whatsoever.
Thoughts?
--
Clive Nicholas
"My colleagues in the social sciences talk a great deal about methodology.
I prefer to call it style." -- Freeman J. Dyson
7 years, 1 month
foreign script editing
by Summers, Peter
Allin et al,
In my playing around with various scripts in Julia, octave and now python, I've come up with a sort of "wish list" for gretl's script editor. All of these refer to editing a script in one of those languages (e.g., via "script files > New script > Python script"), not via use of a "foreign" block in the main gretl script editor. In no particular order:
1. Currently it seems that only one foreign script can be open at once. Could subsequent scripts open in a new tab like what happen in the gretl script editor?
2. Related to this, if I'm editing a Python script and want to open another one, the file search dialogue defaults to looking for *.inp files. It's easy enough to change that, but could that default to the type of script currently being edited?
3. It seems that only gretl scripts support smart indenting. Can that be generalized?
I realize that these things may all have different degrees of difficulty, and none are critical IMO. However it occurred to me that one potential way to expose more people to gretl could be as a front-end to one or more of these other languages. In my own case, as I was going through the process of setting up Atom/Juno for Julila, I thought "hey, why can't I just use gretl's Julia editor?".
Cheers,
Peter
[High Point University logo]
Dr. Peter M. Summers | Assistant Professor
One University Parkway, High Point, NC 27268
Office: 336-841-650 | Department of Economics
Choose to be extraordinary!(r)
[Facebook logo]<https://www.facebook.com/HighPointU>[Twitter logo]<https://twitter.com/HighPointU>[Instagram logo]<http://instagram.com/highpointu>[LinkedIn logo]<https://www.linkedin.com/school/28206>
7 years, 1 month