[Gretl-devel] Re: loop foreach and strings arrays: since when?
On 14/03/2024 10:13, Sven Schreiber wrote: Hi, I'm trying to find out since which gretl version it is possible to use a foreach loop with an array of strings. The official changelog only talks about the recent enabling of a nested array, but not of the original thing. Example: strings S = defarray("hey","ho") loop foreach s S print s print "$s" endloop thanks It looks as if the relevant git push was made on 2019-12-05: commit 0b0d4d747692c5b5b814b0566b0655f37e71e02f Author: Allin Cottrell Date: Thu Dec 5 13:11:02 2019 -0500 "foreach" loops: handle an array of strings and the extension to bundles was made shortly afterwards. Later, on 2021-01-08, this was extended to other array types: commit 2d71f98be5582adf921c1d4a998aedc069e1da55 Author: Allin Cottrell Date: Fri Jan 8 10:45:20 2021 -0500 allow "foreach" loop for all array types Among the lines that you find in that commit: /* Implement "foreach" for arrays other than strings: convert to index loop with automatic max value set to the length of the array. */ So, the minimal gretl version for looping over strings array is probably 2019d, with some generalisation in 2021a. I guess we ought to update the ChangeLog. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --- ___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: User guide plotting chapter: outdated section
On 29/02/2024 12:05, Sven Schreiber wrote: Hi, looking at the chapter "6 Graphs and plots", it seems to me that the sub-section "Publication-quality graphics: advanced options" (within 6.1) is quite outdated. It talks of sizes and terminals and so on which you haven't really had to touch at least for a couple of years. For PDF output we have another GUI controller which does all that, and hand-picking gnuplot terminals is not recommended, I believe. Just adding another screenshot of the PDF controller window would be enough to replace that sub-section, I think. As a cosmetic aside, the picture 6.1 could be updated, the window decorations look 20 years old. (That's probably true for other screenshots as well, though...) In fact, there's been some discussion about having a separate document for describing everything related to graphs and plots, since there's so much that has been going on in that department in the past 2-3 years, and still isn't documented adequately. I had volunteered to start it, but haven't found the time yet. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --- ___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: printf: ignore nan values in a matrix
On 16/02/2024 17:38, Artur T. wrote: Hi Gretl community, I am wondering whether there is a way to ignore printing NA values in a matrix when calling the printf command Suppose you have a matrix like this: Model=1 Model=2 Model=3 Model=4 INT nan -0.12 -0.17 -0.06 pv nan 0.00 0.00 0.09 U -0.07 -0.09 -0.11 nan pv 0.00 0.00 0.00 nan intercept -176.03 -108.49 6.37 -203.84 pv 0.00 0.00 0.00 0.00 l_INC 6.79 4.28 nan 7.81 pv 0.00 0.00 nan 0.00 trend -0.01 -0.01 -0.01 -0.01 pv 0.00 0.00 0.00 0.00 but you would like to replace all nan values by "" (empty string or no value) for better readability. This should not be the default, but maybe there exists some format argument of which I am not aware of. How about this? set seed 1234 C = muniform(5,3) C[2,3] = NA C[3,1] = NA tmp = sprintf("%6.2f", C) new = strsub(tmp, "nan", " ") printf "%s", new ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --- ___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Card & Krueger 1994
On 21/11/2023 02:53, Cottrell, Allin wrote: On Mon, Nov 20, 2023 at 7:56 PM Cottrell, Allin wrote: On Mon, Nov 20, 2023 at 10:13 AM Riccardo (Jack) Lucchetti wrote: I set up a gdt file with dataset used in the famous "NJ-vs-Pennsylvania" article by Card & Krueger on the minimum wage. Since I figure this could be useful to everyone teaching (and learning) causal effects, diff-in-diff and all that, I added it to our /share/data/misc catalogue. Pushed to git. A nice resource to have! And also a non-trivial piece of work, I see. With the original data taking the form of an old-school fixed-format file plus codebook, and an erroneous "unique ID" to be spotted and fixed. Kudos. Thanks (for the fix too)! ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --- ___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Card & Krueger 1994
I set up a gdt file with dataset used in the famous "NJ-vs-Pennsylvania" article by Card & Krueger on the minimum wage. Since I figure this could be useful to everyone teaching (and learning) causal effects, diff-in-diff and all that, I added it to our /share/data/misc catalogue. Pushed to git. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --- ___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: order of string-value codes
On 14/11/2023 16:24, Allin Cottrell wrote: This is somewhat related to recent discussion of "Binary Logit with string series". As you may know, when gretl reads string-valued series from (e.g.) a CSV file, consecutive 1-based numeric codes are attached to the strings in their order of occurrence. In some cases that's fine, but if the string values have a "natural" ordering it may not be so fine. [...] On importing these data "high" will get code 1, "low" code 2, and so on. One may want to recode income as low=1, middle=2, high=3, and also recode working as no=1, yes=2. That's not super difficult in hansl, but I wonder if it would be worthwhile to provide a built-in function to do the job: this could be a new function, or perhaps could be enabled as a variant of strvsort(), via an optional second argument. I like the idea of giving a second argument to strvsort(), in the interest of keeping the namespace as compact as possible. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --- ___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Binary Logit with string series
On 14/11/2023 08:55, Riccardo (Jack) Lucchetti wrote: This is very nice, thanks, Allin! I guess that by the same logic we could enable printing the value labels when we apply multinomial logit to a string-valued series. Never mind, I pushed this to git master already. @Allin: it was a rather simple change, but please review. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --- ___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Binary Logit with string series
On 13/11/2023 19:02, Allin Cottrell wrote: Well, I think it might be expected, since the logit doc starts with "If the dependent variable is a binary variable (all values are 0 or 1)...". But it's not intentional, nor (I think) desirable. Now in git master, if a string-valued series has just two values, and reduces to a straight dummy variable on subtracting 1 from its numeric codes, we'll treat it as a binary case. Note that this is a special dispensation for string-valued series, which much always have a minimum numeric code of 1; we're not going to do this for regular numeric series that have values 1 and 2 -- subtract 1, please! This is very nice, thanks, Allin! I guess that by the same logic we could enable printing the value labels when we apply multinomial logit to a string-valued series. Eg # Replicate example in Wooldridge, table 15.2 set verbose off open keane.gdt stringify(status, defarray("School", "Neither", "Work")) smpl (year==87) --restrict logit status 0 educ exper expersq black --multinomial ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --- ___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: X13 and Tramo-Seats running problems
On 09/11/2023 11:19, francesca di iorio wrote: Thank you very much. The PATH selection solved the problem. everything works now. Thank you again I just tried installing a copy of 2023b on a windows machine, and I noticed that (contrary to what my understanding was) the tickbox for adding the gretl dir to the PATH was on by default. We have discussed this problem yesterday at a developer meeting, and Allin gave very good reasons why in a standard installation the default should be "off": basically, we don't want other programs to be disturbed by different versions of the same DLL that come with gretl. It is possible that this setting is memorised somewhere in the windows registry (or whatever it's called), because the PC I used already had a previous version of gretl installed, for which the path setting could have been originally set to "on". ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --- ___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: doc for bin2dec and dec2bin
On 14/09/2023 14:16, Cottrell, Allin wrote: On Wed, Sep 13, 2023 at 8:11 AM Riccardo (Jack) Lucchetti wrote: > Well, Luca and I were thinking of using them in the upcoming new version of the ParMA package, and I believe Marcin was in favour too. And Peter Summers added, "FWIW, I've used Matlab's dec2bin for running Markov-switching models, so I like this new functionality too." I notice that Matlab's dec2bin employs a string composed of '0's and '1's to represent a binary number. Maybe we want to do that too? In its native form an unsigned integer occupies 4 bytes = 32 bits. If converted a la Matlab that goes up to 33 bytes = 264 bits (allowing for the terminating NUL byte). As currently documented in git, our representation occupies 32 * 8 = 256 bytes or 2048 bits, since a double is used to represent each bit of the integer. This seems kinda profligate in terms of the storage used. I agree. However, our current implementation makes it possible to convert several items at once, as in, for example "dec2bin(seq(1,6)')" or "bin2dec(I(4))". A less contrived example could be given by considering a non-recursive algorithm for computing all possible binary vectors of size n that sum to k (useful, for example in conditional or fixed-effects logit models): n = 5 k = 3 tmp = dec2bin(seq(2^k-1, 2^n-1)')[,1:n] eval selifr(tmp, sumr(tmp) .= k) ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --- ___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: doc for bin2dec and dec2bin
On 13/09/2023 14:02, Cottrell, Allin wrote: On Wed, Sep 13, 2023 at 7:07 AM Riccardo (Jack) Lucchetti wrote: Folks, I just realised that two functions that we added in February 2022 (namely bin2dec and dec2bin) were never documented, although they'd been available since 2022b. I wrote some documentation (comments are welcome). My question is: these functions are nowhere mentioned in the Changelog. Should ve add them to the 2022b entry, or to the entry for the current git version? Good point. The way I recall this is that we never got collectively clear on whether those functions were actually wanted. If so, then certainly they should be documented (and what you've written looks clear to me), and added to the Changelog. Well, Luca and I were thinking of using them in the upcoming new version of the ParMA package, and I believe Marcin was in favour too. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --- ___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] doc for bin2dec and dec2bin
Folks, I just realised that two functions that we added in February 2022 (namely bin2dec and dec2bin) were never documented, although they'd been available since 2022b. I wrote some documentation (comments are welcome). My question is: these functions are nowhere mentioned in the Changelog. Should ve add them to the 2022b entry, or to the entry for the current git version? --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --- ___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: gretl 2023b coming up
On Wed, 12 Jul 2023, Cottrell, Allin wrote: The 4 columns now give: addon name, installed version, version on server, and comment. The comment variants are: * If the two version numbers are the same: "Up to date" * If the installed version is higher: "Local is newer" * If the server version is higher and the server version is compatible with the running gretl version: "Can be updated" * Otherwise: "Requires gretl ", where is the requirement of the addon on the server. Very nice!!! ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: PRE-RELEASE: Testscripts fail
On Wed, 12 Jul 2023, Artur T. wrote: Hi, Given Allin's announcement that a new version will be released soon, I ran the test scripts. 1. For the following script the assertion failed on the latest git-version: https://sourceforge.net/p/gretl/workspace/ci/master/tree/tests/test_scripts/fundamentals/check_trace.inp I am pretty sure that I've never seen it failing before. It's the "sumc" function, which fails for complex arguments. Try this: set seed 39879 X = mnormal(3,3) l = eigen(X) print l eval sumc(diag(X)) eval sumc(l) which gives ? print l l (3 x 1) -1.19391 + 0.0i 0.73406 + 0.96306i 0.73406 - 0.96306i ? eval sumc(diag(X)) 0.27420 ? eval sumc(l) 1.27420 + 0.0i I guess this must be related to the new "skip_na" optional flag, but I have no time to check this morning, sorry. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: gretl crash with omitted arg in hansl function
On Mon, 10 Jul 2023, Sven Schreiber wrote: Hi, I'm seeing the following reproducible crash on Windows 10 on a snapshot from May. (Later I will test on a newer snapshot, but maybe someone can reproduce this.) Confirmed on current git in Linux. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: impossible to access in DBNOMICS
On Fri, 2 Jun 2023, Dionysio Lalountas wrote: Hi all, Tried a few times to enter the dbnomics database and i get The following message Couldn't parse JSON input: :1:1: Parse error: unexpected character `<', expected value *** error in function check_json, line 10 bundle eb = jsongetb(s, "errors") called by function dbn_get_json_from_URL called by function dbn_get_json called by function dbnomics_providers some help is needed thanks Denis It seems to be a website problem: following the url https://db.nomics.world/ an error message appears. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] making matrix functions applicable to matrix arrays
Hi all, I just thought it might be nice to extend the scope of some functions we have. Take rows(), which returns a scalar. Why not have it return a vector when applied to a matrix array? Of course the same could be done with cols(). Other functions that could be extended similarly (altough I'm less certain of the usefulness of such extension) are mlag() and transp(). Note that we already do this in a different context with the strlen() function, but maybe there is some pitfall I can't think of right now, so I'd very much like to hear the community's opinion. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: panel-specific variable transformations in the menu?
On Tue, 9 May 2023, Sven Schreiber wrote: Hi, in real-life teaching I encountered the situation that we wanted to create the time averages in the context of a panel dataset. I told students to write a command using the pmean() function, but among the stuff we did that was the only thing which couldn't be achieved through the menus. So I'm wondering whether it might be an idea to add those kind of functions to the GUI. Of course the "Add" menu is quite long already, perhaps it would make sense to insert a submenu named "panel transformations" or so, and then holding time averages and perhaps also time maxima etc. ? I like the idea of revamping the "Add" menu by introducing submenus. For example, lags, diffs etc could go under "Time series transformations", etc. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: nullspace() weirdness
On Mon, 8 May 2023, Sven Schreiber wrote: Am 08.05.2023 um 21:33 schrieb Cottrell, Allin: On Mon, May 8, 2023 at 12:24 PM Riccardo (Jack) Lucchetti wrote: The inconsistency lies in the fact that the result of nullspace() is normalised by equating the largest element to 1 if has one column, and to be orthonormal otherwise. This may be a little unfortunate if one assumes (as I was doing) that the result is always orthonormal. I agree, this doesn't look nice. Not sure why we thought it was a good idea in the first place. I don't remember, either, but I noticed that apart from normalize_nullspace() in lib/src/gretl_matrix.c there's also a nullspace_normalize function in plugin/jrestrict.c. If the latter is specific to cointegration stuff, I think it would be good if the function name reflected that. If, OTOH, it's a general algebra function, maybe it should also live in lib/src/gretl_matrix.c, and its relationship with the former function should be clarified. It is specific to cointegration stuff (actually: to the special case when restrictions involve the loading matrix alpha), so I'd leave it where it is. As for the idea of renaming it, I don't see a pressing case: after all, it's marked static and it's not going to pollute any namespace outside that context, where its purpose is rather clear. But if we were to choose a more informative name, do you have suggestions? --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] nullspace() weirdness
Hi all, I just realised that our implementation of nullspace() contains a mild inconsistency, that I think we should get rid of. Consider the following script: set verbose off set seed 666 X = mnormal(4,2) V = nullspace(X') print V eval V'V X = mnormal(4,3) V = nullspace(X') print V eval V'V The output is as follows: V (4 x 2) 0.34263 -0.49627 0.64001 -0.18706 0.65853 0.19128 0.19832 0.82591 1. 2.7756e-17 2.7756e-17 1. V (4 x 1) 1. -0.73425 -0.41270 0.052557 1.7122 The inconsistency lies in the fact that the result of nullspace() is normalised by equating the largest element to 1 if has one column, and to be orthonormal otherwise. This may be a little unfortunate if one assumes (as I was doing) that the result is always orthonormal. It appears that this is a conscious decision we made at some point in the past (I guess, to improve legibility): the relevant code is in normalize_nullspace(), line 11025 in lib/src/gretl_matrix.c. This quirk is not particularly difficult to circumvent: all you have to do is something like if cols(V) == 1 V = V ./ sqrt(V'V) endif but still, I think we should modify nullspace() for consistency, although I realise that this glitch is relatively minor, so I wouldn't put up a fight if we left things as they are. By the way, the current behaviour is undocumented, so strictly speaking backwards compatibility shouldn't be an issue. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: join gdt-file: series description gets lost
On Sun, 9 Apr 2023, Sven Schreiber wrote: Am 09.04.2023 um 10:54 schrieb Artur T.: Hi all, I stumbled probably over some bug when joining a series. When appending a gdt-dataset, the description of a series gets shipped. However, when joining a series, this meta-information gets lost. Confirmed - I guess this oversight happened because first 'join' only worked with csv files and only later was extended to accept gdt files as well. I'd hesitate to call this a bug. The "join" command is supposed to be a fairly general method for structured data import, and as such it has no provision for metadata import. OTOH, in the special case when the outer file is gdt, I think this could be provided quite safely. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] LIML glitch
Hi all, I just tried running tsls with the --liml option on a just-identified equation. As is well-known, this should return the same results as ordinary 2sls. For some reason, I'm getting an error: I suspect this is linked to the fact that there's no constant term in the model. I don't have time to debug this myself today, but maybe somebody else can. Here's s simple script exposing the problem: nulldata 100 series w = uniform() series x = normal() series y = normal() tsls y const x ; const w tsls y const x ; const w --liml # this works tsls y x ; w tsls y x ; w --liml # this doesn't --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: translation questions
On Sun, 19 Feb 2023, Sven Schreiber wrote: Hi, it's that time again when we translators finally have to update our translations (but actually I think I'm the only laggard...). But I only have one question: - "Rationale" in the context of the new gretl editor program, which I haven't used yet and so I'm not sure what that means. It seems to be a button label or so. In Itlian I used "Perché?". Would "Warum?" look bad in German? ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: tobit's --quiet flag to quite guiet
On Thu, 26 Jan 2023, Marcin Błażejowski wrote: Hi, the solution was simpler that I thought: the problem was that print_NR_status() did verify 'set messages on/off' , but did not checked for 'set warnings on/off'. The patch in attachment. Marcin, of course in this case this is not a problem, because the patch is quite small and one can easily see what's going on, but generally speaking you may want to add the -w flag to "diff" (or "git diff") to suppress lines where changes only involve whitespace. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: tobit's --quiet flag to quite guiet
On Thu, 19 Jan 2023, Marcin Błażejowski wrote: On 19.01.2023 10:48, Riccardo (Jack) Lucchetti wrote: On Thu, 19 Jan 2023, Marcin Błażejowski wrote: Since the message in fact comes from 'gretl_bfgs.c', there could be a set option for optimizers for suppressing any warnings/messages. Does the "set warnings" command help? Nope. #set verbose off set messages off open mroz.gdt --quiet list X = educ exper age kidsl6 tobit hours const X --quiet Not related to the original point, but I thought it was worth sharing anyway: after some summary investigation, it looks as if the warning you're getting is definitely a false positive due to poor scaling. If you rescale the dependent variable appropriately (say, divide it by 100), the warning message disappears. The threshold we use for printing out the warning message is definitely too strict. Perhaps we should look into some auto-scaling strategy for truncated models (internally, the "tobit" command is just a special case of "intreg"). ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: tobit's --quiet flag to quite guiet
On Thu, 19 Jan 2023, Marcin Błażejowski wrote: Since the message in fact comes from 'gretl_bfgs.c', there could be a set option for optimizers for suppressing any warnings/messages. Does the "set warnings" command help? --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: one-line if conditions
On Mon, 16 Jan 2023, Sven Schreiber wrote: Am 14.01.2023 um 10:35 schrieb Sven Schreiber: Am 13.01.2023 um 21:18 schrieb Cottrell, Allin: On Thu, Jan 12, 2023 at 6:46 AM Sven Schreiber wrote: sorry, here's again one of my crazy syntactic sugar ideas: I think it would be nice if hansl had a more concise way of writing a basic if-endif block, where the thing to be executed is just a single line. I agree; this is something I've thought about from time to time. I kinda like the fortran approach to the one-liner: if then which would require "then" as a new keyword. We can discuss this when we next get a chance. Sure, having a new keyword wouldn't be so bad. And making the cross-connection with the different boolean message I just sent: maybe even introducing AND and OR (all caps, presumably) as aliases for && and || could be nice for a high-level language, like we did with TRUE and FALSE. But let's discuss this. One more thought on this: I guess that in a one-liner no commands would be allowed, right? It seems a bit strange to have something like: if then ols y const x Such a constraint wouldn't be so bad, but what about the whole "genr" apparatus as a command? Something like: if then a = 3 looks nice, but the explicit variant already looks stranger: if then scalar a = 3 Hm. FWIW, I wouldn't like the "one-line-if-statement" very much. (Of course, you may say, I'd be free to avoid it, but...) ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] use of getenv() in the gretl source code
Hi all, due to a recent discussion in the user list https://gretlml.univpm.it/hyperkitty/list/gretl-us...@gretlml.univpm.it/thread/AOEAPJMB7PSGEWCAYUBCFWSOFRDJ3KIU/ Allin and I have begun coding a slight modification to the --robust option to ols that enables the usage of that option with "gappy" time series data. A few minutes ago, I pushed a commit to the git master branch that makes the new behaviour conditional on the existence of an environment variable named "HAC_ALLOW_MISSING". This is a technique we've been using quite often to test new things. In fact, maybe _too_ often. The combined powers of grep and sed allowed me to compile a list of all the environment variables that play a role of some kind; although some are perfectly legitimate (eg HOME, LANG), some are clearly there because of experiments we did in the past. I guess we ought to clean up at least some of them. Of course, Allin and I could see to this without bothering the community, but this may be a good opportunity for aspiring developers to take a peek at the source code and see what's in there, so ideas and contributions from the community are very welcome. The list is: ARELLANO_ASY CLI_NO_PLOTS DFGLS_NO_PVALUE FORCE_GFN_PATH GMM_NORMALIZE_2 GRETL_CONFIG_FILE GRETL_FORCE_SEED GRETL_HOME GRETL_INCLUDE_PATH GRETL_MATRIX_DEBUG GRETL_MATRIX_PRINT6 GRETL_MP_BITS GRETL_MPI_HOSTS GRETL_NO_RLIB GRETL_OLD_EV GRETL_PLUGIN_PATH GRETL_PNG_GRAPH_FONT GRETL_REAL_SVD GRETL_USE_OPENMP GRETL_WORKDIR GRETL_WWW_VERBOSE HAC_ALLOW_MISSING H_EXTRA HOME IMPORT_DEBUG JSONGETB_OLD KALMAN_DEBUG KALMAN_DEJONG KALMAN_EXACT KALMAN_TRACE KALMAN_UNIVAR LANG MINGW_PREFIX OMP_NUM_THREADS PATH REPLACE_NAIVE REPLACE_USE_BTREE R_HOME SHELL SHELLDEBUG VAR_USE_QR Have fun! ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Makefile tweaks --- please test!
Hi all, I just pushed to git a few changes to the Makefiles in the addons directory, with a view to making it possible to build gretl correctly on a system where TeX is absent. I ran what I consider a pretty comprehensive set of tests, but this is of course a rather delicate matter, so I'd appreciate it very much if people could attempt a build from current git and check if the addons (extra, regls, gig, etc.) work correctly and, most, importantly, if the associated pdf help files are ok. Considering that we'd like to release next week, the sooner the better ;) Thanks! --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Document control software for a complete document lifecycle
On Tue, 11 Oct 2022, atecon wrote: Hi, I guess that spam account should be removed from the list. Done. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: GTK3 based gretl on Wayland
On Wed, 14 Sep 2022, Cottrell, Allin wrote: (I for one am not at all ready to discard Xorg's X11 implementation in favor of Wayland. X11 is old, stable and extremely well tested. Wayland, not so much.) Hear, hear. Trouble is, most distros are doing just that. OTOH, this is probably the most effective way to debug Wayland. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Missing citation
On Mon, 8 Aug 2022, Cottrell, Allin wrote: On Mon, Aug 8, 2022 at 5:22 AM Riccardo (Jack) Lucchetti wrote: On Mon, 8 Aug 2022, Marcin Błażejowski wrote: it seems to be a missing citation in 'gretl-lpsolve.tex': "Package natbib Warning: Citation `kantorovich60' on page 5 undefined on input l ine 297" (current git). This was the effect of an incompatibility between the doc package and natbib. Since the former seemed to be unused in the document, I removed it form the git version and things should now be ok. (The funny thing is, the same package is used in gretl-mpi.tex too, but seems to do no harm. Go figure) Thanks, Jack. Weird. Also strange: on my texlive system there's no conflict between doc.sty and natbib, the citation in question works fine. I was going to say, I have no idea why the "doc" package is loaded by any gretl-related latex file -- since it appears to be all about documentation of TeX code itself -- but then I found a reason why it's included by pkgbook.tex: it defines \BibTeX, which is wanted there. Elsewhere it shouldn't be needed. Well, if that's the only reason to keep the doc.sty file in, we might as well add the definiton of \BibTeX to gretl.sty. It's just \def\BibTeX{{\rmfamily B\kern-.05em% \textsc{i\kern-.025em b}\kern-.08em% T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}} ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Missing citation
On Mon, 8 Aug 2022, Riccardo (Jack) Lucchetti wrote: On Mon, 8 Aug 2022, Marcin Błażejowski wrote: Hi, it seems to be a missing citation in 'gretl-lpsolve.tex': "Package natbib Warning: Citation `kantorovich60' on page 5 undefined on input l ine 297" (current git). This was the effect of an incompatibility between the doc package and natbib. Since the former seemed to be unused in the document, I removed it form the git version and things should now be ok. (The funny thing is, the same package is used in gretl-mpi.tex too, but seems to do no harm. Go figure) I just did the same with the documentation for the ivpanel addon: the problem Marcin was referring to would show when doing "make install" with the --enable-build-addons configure switch. Allin, feel free to revert my change and fix the issue any other way you deem more appropriate. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Missing citation
On Mon, 8 Aug 2022, Marcin Błażejowski wrote: Hi, it seems to be a missing citation in 'gretl-lpsolve.tex': "Package natbib Warning: Citation `kantorovich60' on page 5 undefined on input l ine 297" (current git). This was the effect of an incompatibility between the doc package and natbib. Since the former seemed to be unused in the document, I removed it form the git version and things should now be ok. (The funny thing is, the same package is used in gretl-mpi.tex too, but seems to do no harm. Go figure) --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] obsnum() weirdness
Hi all. Consider this script: nulldata 12 setobs 5 2020-02-01 loop i = 6 .. 12 date = sprintf("2020-02-%02d", i) printf "%s -> %d\n", date, obsnum(date) endloop the output I get is: 2020-02-06 -> 4 2020-02-07 -> 5 2020-02-08 -> 6 2020-02-09 -> 7 2020-02-10 -> 6 2020-02-11 -> 7 2020-02-12 -> 8 which is of course correct from Monday to Friday, but obviously wrong for weekends. What do you guys think we should do in these cases? I reckon we ought to return NAs, but I'm open to other ideas. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: garch crash
On Wed, 20 Jul 2022, Artur T. wrote: Hi, I just found that negative lag specifications for the garch command lead to a segmentation fault: open b-g --quiet garch -1 0 ; Y garch 0 -1 ; Y # also crashes This should be fixed in git now. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: qrdecomp with column pivoting?
On Sun, 5 Jun 2022, Riccardo (Jack) Lucchetti wrote: Very nice counterxample, Sven, kudos for that. Let me think about it. In fact this bug also affects the dropcoll() built-in function: nulldata 4 series z = 0 series x = 1 | zeros($nobs - 1,1) list X = z x D = dropcoll(X) list print D So yeah, we need to give this proper consideration. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: qrdecomp with column pivoting?
On Sat, 4 Jun 2022, Sven Schreiber wrote: Am 04.06.2022 um 15:51 schrieb Sven Schreiber: Am 04.06.2022 um 13:11 schrieb Riccardo (Jack) Lucchetti: On Fri, 3 Jun 2022, Cottrell, Allin wrote: columns the execution time is not that different. Note: we currently assess rank using regular QR, by counting the R elements greater than some specified "tiny" value. in Hansl: R = {} Q = qrdecomp(mnormal(4)~zeros(4)~mnormal(4) , ) scalar r = sumc(abs(diag(R)).>1.0e-12) print r OK, thanks, that's what I thought. Hm, but plain QR is not rank-revealing in general, that's why the thing with column-pivoting exists. Trivial example: R = {} A = zeros(4,2) ~ I(4,2) print A Q = qrdecomp(A , ) print rank(A) # correct: 2 scalar r = sumc(abs(diag(R)).>1.0e-12) print r # wrong: 0 Now, I guess that in your internal usage this is quite unlikely to happen, but still, if you don't want to use the SVD for that --and I presume it's because of the computational expenses-- then maybe there's a role for the pivoted QR thing? Very nice counterxample, Sven, kudos for that. Let me think about it. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: qrdecomp with column pivoting?
On Fri, 3 Jun 2022, Cottrell, Allin wrote: On Fri, Jun 3, 2022 at 11:05 AM Sven Schreiber wrote: I'm wondering whether it would be useful (or more precisely, whether the cost-benefit calculation would be net positive...) to generalize the qrdecomp() function to allow column pivoting. Here are a couple of thoughts and remarks on that: 1) First of all, qrdecomp currently does not return an ordered result. For example, when doing this: Q = qrdecomp(mnormal(4)~zeros(4)~mnormal(4) , ) then the middle column of R is zero, just following the input. Of course, this is fully according to spec, nothing else is promised currently. 2) A QR decomposition with pivoting would provide a rank-revealing operation. The natural workaround and alternative way to do this is SVD. It is my understanding that SVD would be noticeably slower, however. (Correct?) Maybe, though I gather that for a matrix with a lot more rows than columns the execution time is not that different. Note: we currently assess rank using regular QR, by counting the R elements greater than some specified "tiny" value. in Hansl: R = {} Q = qrdecomp(mnormal(4)~zeros(4)~mnormal(4) , ) scalar r = sumc(abs(diag(R)).>1.0e-12) print r 3) In Lapack this is given here: https://www.netlib.org/lapack/lug/node42.html, and references the routine xGEQP3 (Level 3 BLAS). There's an interface to that in libgretl's gretl_matrix.c, namely gretl_matrix_QR_pivot_decomp(), though it's not hooked up to any hansl function at present. I find it kinda confusing trying to deal with results after pivoting. You need to pay careful attention to the reordering to avoid producing nonsense. Me too. 4) In terms of a possible interface, the immediate idea would be to have a third and optional boolean switch which defaults to the old behavior, and if set to TRUE then it would use column pivoting. However, perhaps one also wants to retrieve the resulting permutation matrix P in the relationship AP=QR (where A is the input). Then perhaps the third optional argument would be another pointer-to-matrix, just like the second one. Then column pivoting would only be done if a matrix pointer is actually provided in the third slot, capturing the P result. So, what do you think, how difficult would it be to implement this, and does it make sense? It "makes sense" OK, and it's already part-way implemented. Whether it's worthwhile -- I'm agnostic. I'm not really sure what the benefit would be from having column pivoting, which is relatively easy to do in Hansl anyway (note that P is a permutation matrix, so it can be more compactly expressed as a set of indices), although of course numerically speaking lapack is unbeatable. Could you provide us with a use case where pivoting would be useful? ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] matrix commutation operator
Hi all! As you may know, the "extra" package contains a function called "commute" that performs pre-multiplication of a matrix by the so-called "commutation" matrix: in formulae, if A is an rxc matrix, then vec(A') = K_{m,n} vec(A) and K_{m,n} is the "commutation matrix" (in fact, the function in extra is slightly more general, but let's skip this for now). Luca Pedini and myself are writing some C code that would benefit from having this function in libgretl, so we're thinking to add it to the list of native functions. We have a few questions for you: 1) can anybody think of a reason why this would be a bad idea? 2) it's very easy (and computationally inexpensive), to inflect the function in such a way that insted of premultiplication by K_{m,n} one can return the result of premultiplication by (I + K_{m,n}), which is what one actually needs in many cases. Would you think this is good to have too? 3) any suggestion for the function name (also conditional on point 2?) We thouught that "mcommute" could be nice, but we're open to suggestions. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: crash with the fsboost package
On Tue, 17 May 2022, Sven Schreiber wrote: Hi, with a Windows snapshot from April I found that the sample script of the fsboost contributed package produces an error. This was weird because the sample script of a package is always checked before approving it. So I updated to the latest Windows snapshot from May 4th, but now gretl crashes completely when running the same sample script. I suspect there's nothing wrong with fsboost, and instead the snapshots after the 2022a release perhaps include some serious bugs leading to crashes - I'm also thinking of the other recent problem on the mailing list about saving session icons. I have no time to debug this properly right now, but I found that the crash occurs here on linux if the "ridge" package (which is a dependency) is not installed. After intalling that, the sample script of fsboost runs just fine. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: gretl and zoom seemingly unable to play nice together
On Mon, 2 May 2022, Sven Schreiber wrote: Am 02.05.2022 um 16:18 schrieb Riccardo (Jack) Lucchetti: Hi all, I was just shown something I was unaware of: a colleague of mine was having problems with GUI client while sharing his screen on Zoom. The issue is that some of the GUI button don't work: for example, the green/red arrows for regressor selection in the OLS window. They're simply unresponsive. Note that: - the problem happens under windows. I tried sharing my screen on my Linux machine and everything worked fine (no idea about the Mac) - it seems to be zoom-specific: we tried doing the same using SkyPe and, again, everything worked ok. - the gretl verion was 2022a, so with the newest GTK library. If some of the people on the list could try experimenting on their windows machines to have a clearer idea of what's going on, that'd be helpful. Did this happen when sharing the app or the entire desktop? (I know that app-sharing the multiple gretl windows doesn't work with some video tools, but it does work with others.) The entire desktop. We didn't try sharing just the gretl window. However, would that share the "auxiliary" windows (eg the OLS selector) too? I doubt it. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] gretl and zoom seemingly unable to play nice together
Hi all, I was just shown something I was unaware of: a colleague of mine was having problems with GUI client while sharing his screen on Zoom. The issue is that some of the GUI button don't work: for example, the green/red arrows for regressor selection in the OLS window. They're simply unresponsive. Note that: - the problem happens under windows. I tried sharing my screen on my Linux machine and everything worked fine (no idea about the Mac) - it seems to be zoom-specific: we tried doing the same using SkyPe and, again, everything worked ok. - the gretl verion was 2022a, so with the newest GTK library. If some of the people on the list could try experimenting on their windows machines to have a clearer idea of what's going on, that'd be helpful. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] dbnomics-related segfault
Hi all, with current git, the following script clear open dbnomics data Eurostat/namq_10_gdp/Q.CLV05_MEUR.SCA.B1G.EA data OECD/MEI/EA19.LRHUADTT.ST.Q triggers a segfault. I just pushed to git what I believe is a fix, but a review by Allin would be most welcome! --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: choose() function
On Fri, 8 Apr 2022, Sven Schreiber wrote: Am 08.04.2022 um 10:26 schrieb Riccardo (Jack) Lucchetti: On Fri, 8 Apr 2022, Sven Schreiber wrote: Am 08.04.2022 um 10:10 schrieb Riccardo (Jack) Lucchetti: Guys, looking at some old code I had I found this function, which gives you all the possible combinations of k elements from a lis of n objects. For example: ... My question is: I was under the impression that we alreasy added something like this, but I can't find it either among the native functions, nor in the extra package. Any hint? powerset() or something like that? No, powerset() is a different thing OK, well then: combinations() in extra, I guess. Ahhh, thanks, that's the one! --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: choose() function
On Fri, 8 Apr 2022, Sven Schreiber wrote: Am 08.04.2022 um 10:10 schrieb Riccardo (Jack) Lucchetti: Guys, looking at some old code I had I found this function, which gives you all the possible combinations of k elements from a lis of n objects. For example: ... My question is: I was under the impression that we alreasy added something like this, but I can't find it either among the native functions, nor in the extra package. Any hint? powerset() or something like that? No, powerset() is a different thing --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] choose() function
Guys, looking at some old code I had I found this function, which gives you all the possible combinations of k elements from a lis of n objects. For example: function matrix choose(matrix from, scalar h) if h <= 0 ret = {} elif h == 1 matrix ret = vec(from) else ret = {} from = vec(from) n = rows(from) loop i = 1 .. n-h+1 --quiet x = from[i] matrix c = selifr(from, (seq(1,n)' .> i)) if rows(c) > 0 matrix ret |= x ~ choose(c, h-1) endif endloop endif return ret end function eval choose(seq(1,4), 2) returns 1 2 1 3 1 4 2 3 2 4 3 4 . My question is: I was under the impression that we alreasy added something like this, but I can't find it either among the native functions, nor in the extra package. Any hint? --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: crash (was Re: Re: small doc issue: genr markers)
On Thu, 31 Mar 2022, Sven Schreiber wrote: Am 30.03.2022 um 23:31 schrieb Sven Schreiber: Whoops, hit the send button prematurely. I'm afraid the example will have to wait a bit, I'm not finding a good dataset example so easily. While trying to create an example, I came across the following reproducible crash: nulldata 3 series countrycodes stringify(countrycodes, defarray("FR","DE","IT")) # boom I think I know where my mistake is, but as always, it shouldn't crash. This is with a snapshot from four weeks back, on Windows. Same with current git. Of course, the crash doesn't occur if you fill the series with something, as in series countrycodes = time but you're right, the crash shouldn't happen. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: gretl crash
On Fri, 11 Mar 2022, Allin Cottrell wrote: If someone could give me the exact steps to run gretl with "gdb" I can try to do it. Thanks, Ignacio. Here are the steps: [...] valgrind can be another option for tracing the problem. Just install valgrind and issue the command valgrind /usr/bin/gretl_x11 your_script.inp Execution will be _very_ slow, but if you get a crash you should receive a list of the internal functions that led to it. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] problems with sleep()
Hi all, I just pushed to git a micro-fix to avoid the sleep() function freezing gretl. Try for example sleep(-1) sleep(0.1) now it's fixed (the first case is equivalent to sleep(0)). --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Infinities handling
On Wed, 2 Mar 2022, Marcin Błażejowski wrote: Hi, are resuls of below script coherent? eval 1/0 eval { 1/0 } Well, they are, up to a point. Let me expand your example: nulldata 10 eval 1/0 eval {1/0} eval {-1/0} scalar a = 1/0 matrix b = { 1/0 } series c = 1/0 series d = a series e = b series f = mshape(a, $nobs, 1) series g = mshape(b, $nobs, 1) print a b print c .. g --byobs I would say that what we do is try to reach some compromise between IEEE 754 (see https://en.wikipedia.org/wiki/IEEE_754-1985) and what an applied economist would consider "natural" in the context of data analysis. So, for example, we take the liberty to map ±inf to NA when this is appropriate. But as always, Allin is more authoritative than me, so let's see what he has to say. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: gretl crash
On Tue, 1 Mar 2022, Ignacio Diaz-Emparanza wrote: My conclusion: what is causing the crash is the soft link. Don't ask me why I had a path to this soft link. No idea. Well, that IS puzzling. From gretl's point of view a soft link to a library is no different from the actual .so file. I am perplexed. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: seasonal cumulation?
On Fri, 25 Feb 2022, Sven Schreiber wrote: Hi, it occurred to me that we have the diff/cum pair of functions, but for seasonal periodicities we only have sdiff, not "scum" (which maybe wouldn't be an ideal name anyway ;-) Maybe the cum() function could be extended with an optional argument that would allow to invoke a seasonal-step-style cumulation? For example, for quarterly data the result would be out(t) = in(t) + in(t-4), such that sdiff(out) would give you back 'in'. Sven, of course it would be nice to have, but I'm wondering: how often do you need a hypothetical scum() function? Often enough to make series m = x series m = m(-4) + x too lenghty? --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: gretl crash
On Thu, 24 Feb 2022, Ignacio Diaz-Emparanza wrote: Thank you Jack, for trying it, but it seems this is not the problem. I fixed the indentation and gretl continues crashing. I am sending the file for whether you can see another strange character. (I don't understand the output of hexdump) The file you attached runs fine here. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: gretl crash
On Thu, 24 Feb 2022, Ignacio Diaz-Emparanza wrote: I'm getting a reproducible crash when trying to run on my desktop (Ubuntu linux 20.04 and gretl built yesterday from git)the following script(which is as is in the "Hansl Primer" guide): open bjg.gdt foreign language=R --send-data y <- gretldata[, "lg"] strmod <- StructTS(y) compon <- as.ts(tsSmooth(strmod)) vars <- as.matrix(strmod$coef) gretl.export(compon) gretl.export(vars) end foreign append @dotdir/compon.csv rename level lg_level rename slope lg_slope rename sea lg_seas vars = mread("vars.mat", 1) The version of R seems not to affect. I just upgraded from R 3.6 to 4.1.2 obtaining the same crash. I have gretl 2001.c built on august in my laptop (ubuntu 20.04 as well), and this script may be run without problem. OK, two things. Copy-n-pasting Ignacio's script provokes some weird hiccup on mu system because of the indentation (those are not spaces nor tabs; God knows what they are. Hexdump gives me "c2 a0"; go figure). After fixing the indentation, the script runs fine here. Still, a crash should never happen. A few extra points: * The script in fact comes from the User's Guide (chap. 44), not the Hansl Primer. Copy-pasting code from the pdf files will give you nothing but trouble. This is why recent versions of the User's Guide have clickable links to download the example scripts. * Not really relevant but... for that kind of stuff (structural time series models) it's not necessary to go throuh R anymore, since we have the StrucTiSM package ;) * Even less relevant, but... Ignacio: we would value very much your opinion on the new GUI element for setting up state space models. A model like the one in the example (a Local Linear Trend model) is quite easy to handle. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Building and installing addons
On Thu, 3 Feb 2022, Johannes Lips wrote: On 13/01/2022 03:09, Allin Cottrell wrote: On Wed, 12 Jan 2022, Allin Cottrell wrote: On Wed, 12 Jan 2022, Johannes Lips wrote: I couldn't install the dbnomics function package from gretl. When accessing File - Databases - DB.NOMICS I get the error message in the terminal: load function package: failed on /usr/share/gretl/functions/dbnomics/dbnomics.gfn There seems to be a problem with db.nomics itself: opening https://db.nomics.world/ with a browser gives you a similar error. This has been going on since at least yesterday. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: hansl language spec in the TeX listings package
On Tue, 23 Nov 2021, Sven Schreiber wrote: Hi (especially Jack), it occurred to me that from time to time we should update the syntax specification for hansl that we once sent to the maintainer of the TeX listings package. (Which provides syntax coloring in TeX documents; see here for example: https://tug.org/texlive/Contents/live/texmf-dist/tex/latex/listings/listings-hansl.prf) Because there are some new functions that have accumulated over time. This is just a reminder (also to self) for the future. The file to update is in fact https://tug.org/texlive/Contents/live/texmf-dist/tex/latex/listings/lstlang2.sty --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: bug with fcast
On Tue, 4 Jan 2022, ESTEVEZ NUÑEZ JUAN CARLOS wrote: Hi Jack, Your code shows any error message with the Windows-32 zip version until 2018/05/11, but it fails with 2018/08/11 zip version, and following. Maybe some was made meanwhile that causes it. Hope helps. Aaaah thanks Juan Carlos, this is very helpful. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: bug with fcast
On Mon, 3 Jan 2022, Riccardo (Jack) Lucchetti wrote: Hi all (and happy new year), I just found that we have a bug when forecasting from a VECM with exogeneity restrictions (only with certain options for the deterministic part). Some more on this: it seems that in the failing cases we don't transcribe correctly the matrix (internally called B) that corresponds to the "coeff" element of the returned "system" bundle, although the $coeff accessor works ok. For example: open sw_ch14.gdt infl = 100 * sdiff(log(PUNEW)) vecm 2 1 infl LHUR --crt --quiet restrict --full b[1,1] = 1 a[1,1] = 0 end restrict eval $coeff eval $system.coeff returns ? eval $coeff -0.00081327 0.14284 0.43167 0.053219 -0.58767 0.58294 0. 0.028741 ? eval $system.coeff -0.00081327 0.14284 0.43167 0.053219 -0.58767 0.58294 ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] bug with fcast
Hi all (and happy new year), I just found that we have a bug when forecasting from a VECM with exogeneity restrictions (only with certain options for the deterministic part). Example: open sw_ch14.gdt infl = 100 * sdiff(log(PUNEW)) vecm 2 1 infl LHUR --crt --quiet restrict --full b[1,1] = 1 a[1,1] = 0 end restrict fcast infl If you remove the line "a[1,1] = 0", everything is ok. Otherwise, you get this message: VAR coefficient matrix B is of wrong size! Error executing script: halting and on stderr: B should have 1 or 4 rows, but has 3 var->B (3 x 2) -0.00081327 0.14284 0.43167 0.053219 -0.58767 0.58294 This is with current git. I'm just back, so I have quite a lot of stuff to look at before I have time to debug this, but it'd be nice if you guys could try to have a look at it too. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: new feature for string-valued series
On Thu, 9 Dec 2021, Allin Cottrell wrote: Let me point out a new feature in git and snapshots: you can now create a string-valued series directly from an array of strings, subject to the requirement that the length of the array matches either the length of the dataset or the current sample range. Thanks, Allin, this is very useful. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: drop not working in the "swallowed" console area
On Tue, 7 Dec 2021, Allin Cottrell wrote: On Thu, 2 Dec 2021, Sven Schreiber wrote: (on Windows at least) I'm observing that dragging a gretl file (gdt, inp) onto the gretl window doesn't work if it's on the embedded/swallowed console area. This isn't a big deal... There's no sense in dropping a file onto the console area, is there? I mean, nothing that gretl could reasonably do with a file of any kind in that context. A bunch of hansl code, perhaps? --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: basic questions/comments on X13
On Tue, 23 Nov 2021, Sven Schreiber wrote: Am 23.11.2021 um 12:16 schrieb Sven Schreiber: I mean primarily RSA0...RSA5. If deseas() accepts an options bundle, putting together the bundles for those presets would be mostly trivial. Sorry, I was too quick: Adjusting for working days would require more input, so it wouldn't be so trivial in terms of the interface. So maybe skip RSA2 and RSA4, and maybe also RSA5, leaving: RSA0, RSA1, RSA3 for now. I'm beginning to think that we could put together a function package for Demetra-like processing. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: problem with "make pdfdocs" on git
On Sun, 21 Nov 2021, Sven Schreiber wrote: Actually I had done that, and now I've done it again, and still getting the same error. Will check on a native Linux machine with a "cleaner" git state. "make pdfdocs" is working fine here. Are you on the master branch? ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: delimiter for data files in text format
On Fri, 19 Nov 2021, Cottrell, Allin wrote: Well, my reluctance was based on the supposition that in maybe 99+% of cases libgretl would know what separator to use better than most users. I've now added '|' as one of the options libgretl should consider, and in my testing pipe-separated fields work fine. I'm willing to reconsider, but I'd be surprised if anyone can come up with a real-world case where gretl (now) gets it wrong. And I would too. All I'm saying is, why not give the user the option to use the automatic algorithm (as default) or force the delimiter choice for the remaining 1% of the cases? --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: basic questions/comments on X13
On Fri, 19 Nov 2021, Allin Cottrell wrote: It would be quite easy to add an optional bundle-of-options argument to deseas(), to give as much control over the processing as is offered by the GUI interface (perhaps more, if anyone's so motivated). This would be an _excellent_ idea. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] delimiter for data files in text format
This has been dabeted several times, but IMO the issue still remains. A colleague was trying to use gretl to import a dataset (with extension .txt, but that doesn't really matter) whose first lines look like this: "num"|"x"|"y"|"z" "1"|0.273856207444503|-0.036672201779096|0.854726937504524 "2"|2.24481689268639|-0.546030016142993|0.23406506726493 "3"|-0.125423034417563|-0.606878201926287|-0.853921693817499 "4"|-0.54357344128812|1.10835827274681|-0.104247994046094 "5"|-1.45939839398061|-0.274494522530397|0.111905961611328 Eventually, we managed to solve the problem by manually editing the file and replacing pipe characters by commas, but it would have been nice to have an option to give the CSV importer the delimiter character to split columns. This would also solve cases when you get a mish-mash of commas and semi-colons, like in (pseudo-)CSV files produced by national versions of some spreadsheets. Allin, I think I remember you were against this feature for some reason, but I can't recall what it was. Could you please remind me? Thanks! --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: basic questions/comments on X13
On Tue, 16 Nov 2021, Sven Schreiber wrote: Am 16.11.2021 um 17:46 schrieb Hélio Guilherme: Well, it is base on TRAMO-SEATS and X12-ARIMA, see https://github.com/jdemetra/jdemetra-core It should not be that hard to adapt from Java to C. Maybe. I see two problems: - It is under continuous development, so porting from Java to C would not be just a one-off effort. - AFAIK, X12 was never ported to be "native" in gretl, and for good reasons (I guess). Wouldn't those reasons also apply to JDemetra(+) ? What we do in gretl is _not_ implementing either X12/X13 nor TRAMO/SEATS independently. That would be far too complex. For some time, Francesca di Iorio and me toyed with the idea of rewriting TRAMO/SEATS in hansl. Eventually, we gave up: it's just too complicated and it's not worth the effort. We should have listened to the advice Gabriele Fiorentini (probably one of the 5 people on earth who knows what actually goes on in the TRAMO/SEATS FORTRAN source) had given us: "you're crazy", he had said. What we do is provide a transparent interface to the corresponding binaries (and IMO we're quite good at that). Now it seems that The JDemetra+ guys have done the crazy thing. From the reference manual: [...] Eurostat took an initiative to create new software [...] The resulting program is called JDemetra+. [...] the most critical innovation is the re-writing of the original FORTRAN codes of X12-ARIMA/X-13ARIMA-SEATS and TRAMO/SEATS in JAVA, following a real object-oriented approach. (taken from https://ec.europa.eu/eurostat/cros/system/files/jdemetra_reference_manual_version_2.1_0.pdf) I'm saying "it seems" bacause after navigating the GitHub repo Hélio linked, I can't find any numerical code, and there should be A LOT of that: for example, if JDemetra+ actually implemented X13, it should contain a complete implementation of ARIMA modelling, that I can't find anywhere. Maybe I'm just looking in the wrong place. Oh well. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Nice daily dataset
On Thu, 11 Nov 2021, Sven Schreiber wrote: Am 11.11.2021 um 08:29 schrieb Riccardo (Jack) Lucchetti: On Thu, 11 Nov 2021, Artur T. wrote: Am 10.11.21 um 22:41 schrieb Riccardo (Jack) Lucchetti: Folks, while trying out a few time-series things, I realised we don't have a nice 7-day-per-week sample dataset to play with weekly + yearly seasonality, exogenous effects etc. So I found one from Kaggle and packaged it in gdt format (attached). The original source is https://www.kaggle.com/contactprad/bike-share-daily-data Would you have objections if I added it to our repertoire of sample datasets? OK, now in git. I hope the license is a free one. (Or do datasets have no licenses?) I've never heard of licences on datasets. BTW, I just repackaged stuff that is already publicly available on kaggle. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Nice daily dataset
On Thu, 11 Nov 2021, Artur T. wrote: Am 10.11.21 um 22:41 schrieb Riccardo (Jack) Lucchetti: Folks, while trying out a few time-series things, I realised we don't have a nice 7-day-per-week sample dataset to play with weekly + yearly seasonality, exogenous effects etc. So I found one from Kaggle and packaged it in gdt format (attached). The original source is https://www.kaggle.com/contactprad/bike-share-daily-data Would you have objections if I added it to our repertoire of sample datasets? Hi, Looks to me like a nice dataset which is not too large. OK, now in git. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Nice daily dataset
Folks, while trying out a few time-series things, I realised we don't have a nice 7-day-per-week sample dataset to play with weekly + yearly seasonality, exogenous effects etc. So I found one from Kaggle and packaged it in gdt format (attached). The original source is https://www.kaggle.com/contactprad/bike-share-daily-data Would you have objections if I added it to our repertoire of sample datasets? --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --- bikesharing.gdt Description: Binary data ___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: MPI bootstrap failures depending on number of iterations
On Wed, 3 Nov 2021, Sven Schreiber wrote: Hi, I'm struggling with a hard-to-pinpoint problem involving MPI - this is in relation to the johansensmall package and a pending update. I cannot yet give very much detail, but in a certain special context for a lower number of specified bootstrap iterations the thing runs fine, whereas when cranking up that iteration number, it basically fails with the typical obscure message from gretlmpi that an external command failed. So the algorithm and code per se do not seem to be wrong, or else it would always fail. My suspicion for now is related to some kind of memory limitation or a similar constraint. Is that conceivable? How would one check for that? Could it be that there is an extreme corner case, that occurs with very small probability, that makes some command fail with error under very extreme circumstances? Something like generating a 2x2 matrix with numerical rank one (just the first example that crosses my mind). This would explain why the problem occurs only with a very high number of replications. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: "markers" command
On Tue, 2 Nov 2021, Allin Cottrell wrote: No reason other than laziness ;-) It's now in git. Thanks, Allin. Italian help updated too. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] "markers" command
Currently, we can write the observation markers to a file or to an array, but we can only read the markers from a file. Of course, one can always write an array to a file and proceed from there, but it'd be easier if we had a --from-array option. Allin, is there a reason for the lack of this option? --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Current state with distance()
On Sat, 30 Oct 2021, Artur T. wrote: Am 30.10.21 um 11:58 schrieb Riccardo (Jack) Lucchetti: On Sat, 30 Oct 2021, Artur T. wrote: But in fact I think that when argument 3 is non-null, having a matrix as output is preferable aafter all. If we all agree, I can take care of this later today. I think that's useful. OK, it's now in git. I also updated the doc file and, while I was at it, I documented the new features in vech() and unvech(). Hi Jack, the dimensions are still different to what sklearn returns. Well, it wasn't my intention to clone sklearn. Are you sure it's not just the transpose? --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Current state with distance()
On Sat, 30 Oct 2021, Artur T. wrote: But in fact I think that when argument 3 is non-null, having a matrix as output is preferable aafter all. If we all agree, I can take care of this later today. I think that's useful. OK, it's now in git. I also updated the doc file and, while I was at it, I documented the new features in vech() and unvech(). --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Current state with distance()
On Sat, 30 Oct 2021, Artur T. wrote: Am 30.10.21 um 10:37 schrieb Artur T.: Hi, I am currently testing the new distance() function under development. Thank you again for this new feature. I am focusing on the pairwise case where both matrices X and Y are given. Here is a toy example: Also, the help text does not say anything on the return dimension in case both matrices X and Y are given. Oh, actually this is not true. The help text says: "If Y is given, it must be a p×n matrix, each row of which is again treated as a point in n-space. In this case the return value is a column vector of length mp." But in fact I think that when argument 3 is non-null, having a matrix as output is preferable aafter all. If we all agree, I can take care of this later today. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Remaining panel-time issues
On Fri, 8 Oct 2021, Allin Cottrell wrote: - Again panel dataset with daily time: Trying out the new sample selection dialog, the time periods are apparently shown in epoch representation. Ah, that would please Jack! :D --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: a certain case where the error message could be more informative
On Tue, 5 Oct 2021, Sven Schreiber wrote: Hi, I just had to debug a script which failed with a generic "data error". Gretl correctly indicated the failing line "k++", but it took me a while to find out that k was undefined at that point. If the error message had been "unknown object 'k'", it would have been much easier. Uhm. We do catch that special case: it's the "else" branch in undefined_symbol_error() from lib/src/genlex.c, where we store the appropriate message string into the parser struct. The trouble is, it doesn't get printed, for some reason. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] download+installer script for linux
Guys, I just tested the bash script in our git workspace area https://sourceforge.net/p/gretl/workspace/ci/master/tree/misc/buildgretl/ to install 2021d on a few linux boxes, and it worked just fine. I'd suggest to prepare a tarball containing (a) the script itself (already marked as executable to save people time) and (b) the readme file and make it downloadable from the main gretl webpage. I suppose the "Download" section could be the appropriate place. What do you think? --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: questions about Artur's calendar_utils package
On Thu, 30 Sep 2021, Sven Schreiber wrote: Am 30.09.2021 um 16:50 schrieb Riccardo (Jack) Lucchetti: On Thu, 30 Sep 2021, Sven Schreiber wrote: Am 30.09.2021 um 16:39 schrieb Riccardo (Jack) Lucchetti: Indeed, this looks like a strptime bug. For example: So you mean gretl's strptime, or some other underlying library's strptime? I mean gretl's implementation. Although this is weird, since our own strpitime is basically just a wrapper around the corresponding C function. If you want to take a look, the function you want is at line 8510 of lib/src/geneval.c. Don't know about the code there, but in principle it feels like an off-by-one bug, no? I think I have an Idea of what's happening. Here's a bare-bone replication of what happens "inside" (tested on Linux, I have no idea if it evenm works on windows). #define _XOPEN_SOURCE #include #include int main() { struct tm tm = {0}; char a[] = "1984-01-01"; char b[128]; char fmt[] = "%Y-%m-%d"; char *s; s = strptime(a, fmt, ); if (s != NULL) { time_t t = mktime(); strftime(b, 128, "%Y-%m-%d %H:%M", gmtime()); printf("%s\n", b); strftime(b, 128, "%Y-%m-%d %H:%M", localtime()); printf("%s\n", b); } else { puts("strptime failed!\n"); } return 0; } The problem may have to do with time zones. I can't investigate further, thow, I've got to run, sorry. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: questions about Artur's calendar_utils package
On Thu, 30 Sep 2021, Sven Schreiber wrote: Am 30.09.2021 um 16:39 schrieb Riccardo (Jack) Lucchetti: On Thu, 30 Sep 2021, Sven Schreiber wrote: Then, I'm observing that the result for date_to_iso8601("1984", "%Y") is: 19831231. Is this a bug? I would have expected 19840101. Indeed, this looks like a strptime bug. For example: So you mean gretl's strptime, or some other underlying library's strptime? I mean gretl's implementation. Although this is weird, since our own strpitime is basically just a wrapper around the corresponding C function. If you want to take a look, the function you want is at line 8510 of lib/src/geneval.c. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: questions about Artur's calendar_utils package
On Thu, 30 Sep 2021, Sven Schreiber wrote: Then, I'm observing that the result for date_to_iso8601("1984", "%Y") is: 19831231. Is this a bug? I would have expected 19840101. Indeed, this looks like a strptime bug. For example: a = strptime("1984", "%Y") b = strftime(a, "%Y-%m-%d %H:%M") print b gives "1983-12-31 00:00", whereas from datetime import datetime; a = datetime.strptime("1984", "%Y"); b = datetime.strftime(a, "%Y-%m-%d %H:%M"); print(b); gives "1984-01-01 00:00". --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: special syntax for "end of matrix"
On Sun, 19 Sep 2021, Riccardo (Jack) Lucchetti wrote: On Sun, 19 Sep 2021, Sven Schreiber wrote: Am 17.09.2021 um 21:41 schrieb Riccardo (Jack) Lucchetti: On Fri, 17 Sep 2021, Allin Cottrell wrote: Aha, my bad, sorry, I had mis-diagnosed the problem. The problem arises with the $coeff accessor. For example: open data4-1 ols 1 0 2 3 4 b = $coeff[end-2:] So apart from these special hiccups, is the new (but experimental) syntax supposed to work for indexing in general, including arrays? As far as my understanding goes, yes, but I think it'd be wise to wait for one (or maybe two) release cycle(s) before advertising it as official. Just before release: I just realised that "end" doesn't work for strings (neither does the [k:] syntax anyway). Allin, would this be difficult to add? Not a priority of course, I'm perfectly happy with putting this off for a while. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: sscanf -> segfault
On Tue, 21 Sep 2021, Sven Schreiber wrote: Am 21.09.2021 um 14:51 schrieb Riccardo (Jack) Lucchetti: The "sscanf" command is deprecated, so this is probably not very important, however: I just discovered a way to trigger a segfault. Just open a console or gretlcli, type "sscanf" and hit Enter. Boom. Fortunately, the fix was easy and I just pushed it to git. Thanks, Jack! Maybe it would be a good idea to trivially test all the commands that we have (or have had) by just typing them without any parameters, like you did with sscanf !? Well, I'm not stopping you! ;) ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] sscanf -> segfault
The "sscanf" command is deprecated, so this is probably not very important, however: I just discovered a way to trigger a segfault. Just open a console or gretlcli, type "sscanf" and hit Enter. Boom. Fortunately, the fix was easy and I just pushed it to git. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: special syntax for "end of matrix"
On Sun, 19 Sep 2021, Sven Schreiber wrote: Am 17.09.2021 um 21:41 schrieb Riccardo (Jack) Lucchetti: On Fri, 17 Sep 2021, Allin Cottrell wrote: Aha, my bad, sorry, I had mis-diagnosed the problem. The problem arises with the $coeff accessor. For example: open data4-1 ols 1 0 2 3 4 b = $coeff[end-2:] So apart from these special hiccups, is the new (but experimental) syntax supposed to work for indexing in general, including arrays? As far as my understanding goes, yes, but I think it'd be wise to wait for one (or maybe two) release cycle(s) before advertising it as official. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: special syntax for "end of matrix"
On Fri, 17 Sep 2021, Allin Cottrell wrote: On Fri, 17 Sep 2021, Riccardo (Jack) Lucchetti wrote: The only thing I found missing, after some experimentation, is the ability to use "end" for the starting element of the matric slice, as in y = x[end-2:] Hmm, that seems to work OK here: Aha, my bad, sorry, I had mis-diagnosed the problem. The problem arises with the $coeff accessor. For example: open data4-1 ols 1 0 2 3 4 b = $coeff[end-2:] --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: special syntax for "end of matrix"
On Wed, 15 Sep 2021, Cottrell, Allin wrote: In current git there's a first pass at implementing this, for matrices. It's a bit of a hack, but a more rigorous version would be quite complicated. [...] Here's a description of what we have now. Comments welcome. In the current, experimental implementation of indexation from the end, the keyword 'end' is defined as the maximum signed 32-bit integer (INT_MAX = 2147483647). If we come across 'end-k' we replace it with INT_MAX-k (and similarly for end/2, 0.25*end or whatever). It IS a hack, but I'd say a VERY clever one. Kudos, Allin. The only thing I found missing, after some experimentation, is the ability to use "end" for the starting element of the matric slice, as in y = x[end-2:] Otherwise, I haven't been able to find anything wrong with it. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] curious bug
Hi all, being the king of the typo has its advantages: for example, you find weird bugs: nulldata 60 setobs 4 1:1 y = normal() ols y 0 y(0 -to -1) # note the typo ols y 0 y(1) The two models are identical. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: special syntax for "end of matrix"
On Tue, 14 Sep 2021, Sven Schreiber wrote: I have always liked the feature (also when Jack was still opposed ;-) , but I wonder if this is the right time for such "hacks". I don't remember ever voicing an opinion on this (in fact, I don't remember even having one!) but I may be wrong. Anyway: I guess we can leave this undocumented for the next release and test it "in the field". ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: special syntax for "end of matrix"
On Tue, 14 Sep 2021, atecon wrote: Hi, I also think that this is desirable: I so often thought that this may be useful in the contexts of a matrix and of an array (even series?). In the case of a series, the presence of missing entries could be a problem, I think. One question: How would such an "end" operator work "under the hood"? a) Is it triggering the computation of rows(X) AND cols(X) each time "end" is called, or b) is it a property of matrix X, meaning that once X is initialized, the number of rows and columns is automatically computed and this information stored as a property of the object X? It's (b). The computational cost of the rows() and cols() function is nearly zero. The "matrix" struct definition is in lib/src/gretl_matrix.h, line 77. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] special syntax for "end of matrix"
The recent fix to the biprobit command led me to think about the fact that we currently don't have a way to indicate the element of a matrix that is second-from-last, third-from-last, etc. At present we have to use contructs like b = a[3:rows(a)-1] In matlab, you can use the "end" keyword, as in b = a(3:end-1) I was wondering if we could have the same syntax (and ideally extend it to other multidimensional objects, such as arrays). After all, "end" is already a reserved word, so there's no risk of "end" being a pre-existing identifier. This feature would probably complicate a bit the handling of the matrix slicing syntax, but I guess it's doable. Question #1: is this desirable? (My answer: yes) Question #2: is this doable? (I guess it is) Question #3: is this worth implementing for 2021d, which is going to be out soon? (maybe not). ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: gretl 2021c released
On Mon, 30 Aug 2021, Allin Cottrell wrote: Apologies for cross-posting, but here's the change log for the 2021c release, now available at http://gretl.sourceforge.net/ [...] - GUI: introduce experimental features: plot collections and integrated console On this particular feature, I prepared a short video. If you have 10 minutes to spare, here it is: https://youtu.be/VTAQrCJJqn0 With apologies for cross-posting on my part as well! --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: Static code analysis of gretl
On Tue, 24 Aug 2021, Sven Schreiber wrote: Thanks, Hélio, this is potentially very useful. Artur came up with a similar (I think) automated analysis in the past, and a few code improvements resulted from that. OTOH, I'm sure that the true number of flaws and bugs is nowhere near the astronomical number reported there. I'd say the artificial intelligence there is not mature enough yet and the result needs more filtering. But I'm especially curious about the assessment of what they call potential security flaws. I gave it a brief look. From a quick and non-systematic spot-check, it would seem that many traditional C idioms are marked as potentially dangerous, but from what I've seen we're OK. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] The 2021c release candidate is available (with apologies for cross-posting)
Hi all, on behalf of the development team, I'm glad to announce that we're about to release gretl 2021c. The official release will take place in a week or so, but you can already see what's new by downloading and installing the 2021c release candidate: 64-bit Windows: https://sourceforge.net/projects/gretl/files/snapshots/gretl_install-64.exe/download Mac OS (Intel): https://sourceforge.net/projects/gretl/files/snapshots/gretl-macos-intel.pkg/download Mac OS (M1): https://sourceforge.net/projects/gretl/files/snapshots/gretl-macos-arm64.pkg/download To have a quick idea of what the new stuff is, take look at the Changelog: http://gretl.sourceforge.net/ChangeLog.html In fact, we'd appreciate it very much if you could give these versions a good go: we have tried to squash all the bugs we were aware of, but you can never be 100% sure, so please hammer on the release candidates as much as you can. Some of the new GUI features are somewhat experimental, so we'd be grateful if you could try them out. To enable them, go to Tools>Preferences>General and look for the following: 1) the "plot collection" feature (multiple plots in one window); see the help for "set plot_collection" 2) the "Main window includes console" feature (try it for yourselves, I don't want to spoil it for you). Between now and the official release, we'll only fix any bugs you may report (no new features), and give the translators some time to send us updates of the PO files. As of now, the only localisations that are 100% complete are Italian and Russian (thanks to Olesya Petrenko). Should you have any question or comment, please feel free to contact any of us. Thanks! PS: Linux people will have to download the source and compile it themselves; the source code is at https://sourceforge.net/projects/gretl/files/snapshots/gretl-source.tar.xz/download If you need guidance on how to build, have a look at Appendix B in the User's Guide, or watch the excellent video by Clive Nicholas: https://youtu.be/WSdZkd-uln4 ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: "set plot_collection" doc
On Tue, 17 Aug 2021, Allin Cottrell wrote: On Tue, 17 Aug 2021, Riccardo (Jack) Lucchetti wrote: I realised that one of the new features was not documented in the xml file, so I added a paragraph. If someone could take a look to what's in git, that'd be great. That looks right to me. But is it verified that it's what gretl actually does? I hadn't, but I have now: function void do_plots(list X, bool slowly[0]) tmp = "" setting = "" outfile --buffer=tmp set plot_collection end outfile sscanf(tmp, "plot_collection: code, currently %s", setting) loop foreach i X string title = sprintf("$i - %s", setting) if slowly sleep(2) title = title ~ " (slowly)" endif plot X.$i options time-series with-lines printf "set title '%s'\n", title end plot --output=display endloop if slowly sleep(2) endif end function open AWM18 list X = YER .. GCR set plot_collection off do_plots(X) set plot_collection on do_plots(X) set plot_collection auto do_plots(X, 1) do_plots(X) ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] "set plot_collection" doc
I realised that one of the new features was not documented in the xml file, so I added a paragraph. If someone could take a look to what's in git, that'd be great. --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: 'msplitby' quirks
On Thu, 12 Aug 2021, Sven Schreiber wrote: Am 12.08.2021 um 17:28 schrieb Allin Cottrell: On Thu, 12 Aug 2021, Sven Schreiber wrote: I tested a little bit, and mostly it works fine I think. Some minor observations: - If the rows (or cols) are not dividible by "by", I get an "invalid arg" error. Perhaps "Matrix not conformable" would be a more informative error? - (Probably not new behavior:) A scalar in place of M does not seem to be allowed, as in msplitby(2, {1}). Of course this operation does not look very useful, but it could arise in a corner case in a function or script. And my understanding is that gretl always tries to allow a scalar where a 1x1 matrix is valid, and msplitby({2}, {1}) already works. Those two points are now addressed in git. thanks for the quick reaction! I documented the new features in git. Please take a look. ------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/
[Gretl-devel] Re: translation questions
On Fri, 13 Aug 2021, Sven Schreiber wrote: Hi, I'm updating the German translation for the upcoming release, prompting some questions. (BTW, are all translators on this devel list?) - "Feature border width:" Not sure what "feature" is in this context, although I understand that it's about geoplot. A "feature", in GeoJSON lingo, is a region, a portion of territory. This setting is used to tweach the linewidth of borders. - "Folds:" (in the regls cross validation context I believe) I know what it is, but I'm looking for a good translation, if anybody has an idea. (Hints about other languages may also be helpful.) The German wikipedia entry for cross validation didn't give me a clue. [More background, if you care about it: On the web I've sometimes read "Falte(n)", which I believe is a wrong substantivization of the verb "falten" (= to fold) -- because "Falte" actually means "wrinkle". For now I put in the different substantivization "Faltung(en)"; ISI suggest that for "folding" (https://www.isi-web.org/isi.cbs.nl/glossary/term1286.htm), but it doesn't have "fold(s". Another alternative might be the literal translation of "sample parts".] In the Italian translation I used "Fold (sottocampioni):" which is a good compromise IMO --- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucche...@univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti ---___ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/