printf poll?
by Allin Cottrell
Coming off Sven's posting at
http://lists.wfu.edu/pipermail/gretl-devel/2016-September/006903.html
I'd like to show a couple of real-world examples of alternatives to
"good old" printf in the econometrics domain.
I'd be interested to hear what people think of the comparison. If
lots of people tell me they still think printf sucks, than I guess
I'll have to rethink.
<hansl>
set echo off
set messages off
# hansl, using printf
h = 8
w = 6
printf "Henry the %gth had %g wives\n", h, w
vname = "dispinc"
b = 0.9307
se = 0.0421
printf "The coefficient on %s is %g, with std error %g\n",
vname, b, se
foreign language=R
h <- 8
w <- 6
cat(paste("Henry the", h, "th had", w, "wives\n"))
vname <- "dispinc"
b <- 0.9307
se <- 0.0421
cat(paste("The coefficient on", vname, "is", b, ", with std error",
se, "\n"))
end foreign
foreign language=Ox
#include <oxstd.h>
main() {
decl h = 8;
decl w = 6;
print("Henry the ", h, "th had ", w, " wives\n");
decl vname = "dispinc";
decl b = 0.9307;
decl se = 0.0421;
print("The coefficient on ", vname, " is ", b, " with std error ",
se, "\n");
}
end foreign
</hansl>
Allin
8 years, 3 months
print string array in a bundle
by Sven Schreiber
Hi,
print b.s
doesn't work if s is an array of strings inside the bundle b.
(It works if I make a temp copy first, for example 's = b.s', so it
looks like a bug.)
This is with a snapshot from last month.
Thanks,
Sven
8 years, 3 months
C-isms in hansl
by Sven Schreiber
Hi,
this is a quite fundamental remark I guess, but at the same time perhaps
doesn't affect too many concrete things.
I think that hansl still might resemble C too much in some aspects, and
the only real reason that I can see is that the gretl founders come from
the C background.
* The "printf" command:
For newcomers something like 'printf "hi: %s, %d", s1, d1' must look
horrible. In other languages including even Ox or --I believe-- C++ it
is possible to write things in the natural ordering, so in hansl this
would become something like:
'print "hi: " ~ s1 ~ d1'
Of course, for more finetuned control the current printf possibilities
would still be needed, but for many cases a default formatting of
numbers would be enough I think.
* Function names like "strstr": Tastes will vary here, but when we
discussed whether or not the name of the function was intuitive for what
it does, the only real argument was that it's just the C name. But IMHO
for the hansl user it should be irrelevant whether gretl in the
background is implemented in C or whatever other language.
Probably there are more examples, but I guess the "printf" thing is the
most glaring one from a user's point of view.
Happy to hear your thoughts,
Sven
8 years, 3 months
df question for modtest --autocorr after tsls
by oleg_komashko@ukr.net
Dear all,
Gretl output makes a reference to Gogfrey(1994)
for Pseudo-LMF statistics.
It says (p. 533)
As a finite sample adjustment,
the tests are implemented in section IV
by comparing g-1 IVLR_j, g-1 IVLM_J and
g-1 IVWD_j to a right-hand-tail critical value of
the F(g, T - k - g) distribution, j = 0, g.
Here k is the number of rhs variables in
the original model, and g is the number
of lagged uhat's.
To reproduce:
open denmark.gdt
tsls LRM 0 LRY ; 0 IBO IDE
modtest --autocorr 4
We see
Test statistic: Pseudo-LMF = 13.186979,
with p-value = P(F(4,53) > 13.187) = 2.3e-07
I.e. gretl uses F(g, T - k ) instead of F(g, T - k - g)
Is this a bug, or there is a newer corrected
reference?
Oleh
8 years, 3 months
Several errors when using "make pdfdocs"
by Artur T.
Hi Allin and Jack,
I just tried to compile the latest source of gretl but got several error
messages when trying to build the manual via "make pdfdocs". Usually
this works fine.
Best,
Artur
<terminal output>
Package natbib Warning: Citation `mandelbrot83' on page 33 undefined on
input l
ine 2778.
[33] [34] [35] [36] [37]
Package natbib Warning: Citation `maddala92' on page 38 undefined on
input line
3217.
Package natbib Warning: Citation `belsley-etal80' on page 38 undefined
on input
line 3217.
[38] [39] [40] [41]
Package natbib Warning: Citation `satter46' on page 42 undefined on
input line
3589.
[42]
Package natbib Warning: Citation `armesto10' on page 43 undefined on
input line
3611.
! Missing $ inserted.
<inserted text>
$
l.3623 ...a \hyperlink{cmd-MIDAS_list}{MIDAS_list}
, two
</terminal output>
8 years, 3 months