I tried to access the single values of the $coeff array directly with the
a = $coeff[x,1]
that is a usage of the $coeff array not mentioned in the command reference,
but anyway it is supposed to return a scalar. On the contrary it returns a
Obviously by priorly assigning the array of coeff to another vector and then
accessing the second one everything works fine.
Or rather, even more simply, i could specify the new variable as scalar
scalar a = $coeff[x,1]
but here another inconvenient raises. If I try to print the variable a
without explicitly using the print command, after a few runnig of the same
script gretl crashes.
To clarify things here is a stupid script, that if is launched a few times
in succession causes Gretl to crash. The number of launches before crashing
appears to be quite random.
a = uniform()
b = uniform()
ols a const b
genr cc = $coeff(b)
By the way it could be nice to access the coefficients in the array with a
command like $coeff( number), useful if you don't know the name of the
This comment/question may be unnecessary, and I confess I don't know the
details of what I'm talking about, but just to make sure:
I just read somewhere that "long" integers are not only different
between 32-bit and 64-bit platforms (in general), but that that
difference also depends on the OS, so that the change from 32-bit Linux
to 64-bit Linux is not the same as from 32-bit Windows to 64-bit Windows.
If that affects gretl at all, I presume that Allin is aware of that, but
I guess there may be a small probability that he's not, hence this message.
On Thu, Mar 27, 2008 at 5:25 AM, Allin Cottrell <cottrell at wfu.edu>
> Mariusz is right, these are not (yet) built-in commands, but since
> this is not the first time the Breusch-Pagan test has been
> requested, I've added it in CVS.
> # shortcuts, new in gretl CVS
> ols 1 0 xlist --quiet
> lmtest --breusch
> lmtest --breusch --robust # invokes Koenker
Could you also add a menu entry for this in the GUI, please?
Maybe a rearrangement with two entries:
Tests > Heteroskedasticity > White's test
Tests > Heteroskedasticity > Breusch-Pagan test
Some thoughts about the future of gretl:
Gretl is a great software, but to continue to be developed into a fully
featured statistical/econometrics software it needs to get more developers
involved. There are two ways that gretl’s functionality can be extended: By
attracting new developers with C programming skills, or by user written
While more C programmers are of course much welcome and needed, and will
sooner or later arrive, I think that the largest potential for extending
gretl’s functionality is user written add-on packages/functions. This is
what has made LaTeX and R so large and widely used: The hundreds of user
written add-on packages.
Gretl currently has some basic support for user written add-on functions,
but to be fully functional I think this need to be improved slightly. This
is a work that I think will payoff fast.
I think the following three features of gretl’s support for user written
functions need to be improved:
1. First, there is a need for a possibility to pack several functions
together in one package, in the way one can do in R. In gretl, I think this
could be implemented like when loading a function now, but instead of the
function appearing directly a dailog box appears where the user can choose
which of the functions in the package to use.
2. Secondly, the layout of the GUI produced by gretl for user written
functions needs to be improved. In particular, the function should provide
a string attached to each function parameter, with this string appearing in
the GUI instead of the function variable name and type, which currently
appear in the GUI window. For example, for the function JB the function
call could be something like
function JB (series tmp “Variable to be tested”, scalar No_coef_in_OLS
“Number of coefficients in OLS”)
producing a GUI according to the attached screenshot, instead of the
(See attached file: suggested function dialog.JPG)
function JB (series tmp, scalar No_coef_in_OLS)
in the other attached screenshot.
(See attached file: current function dialog.jpg)
It is easier for a user of the function to understand ”Number of
coefficients in OLS” than “No_coef_in_OLS”. And it looks much nicer.
This would be especially useful for boolean parameters, when one wants to
have a rather long sentence, like “Assume standard deviation is population
value” instead of writing “Stddevispopval” as one has to do now.
3. Thirdly, a new input parameter type that is needed but is not available
right now: A parameter type “select” where e.g.
function foo(select variable_type “Variable type” [nominal “Nominal scale”,
ordinal “Ordinal scale”, interval “Interval scale”, ratio “Ratio scale”])
would produce a drop down list where the user can select one of the
variable types “Nominal scale”, “Ordinal scale”, “Interval scale” or “Ratio
In the internal function code then the function programmer can add
if variable_type = nominal
elif variable_type = ordinal
do other stuff
Best regards and thanks for a great software,
cottrell(a)wfu.edu @ INTERNET skrev 2008-03-18 16:01:19 :
> Each time you do "dataset resample N" it is implicit that the
> original dataset should be taken as the baseline, since this seemed
> the most natural assumption.
Thanks. Very good.
It looks great. However, to be really useful with bootstrapping, it should
be possible to use the dataset command inside loops, which is not possible
cottrell(a)wfu.edu @ INTERNET skrev 2008-03-15 17:52:08 :
> A while back, Andreas asked that the facility for resampling (with
> replacement) the entire dataset be (a) documented, and (b) make
> In current CVS and Windows snapshot I have implemented (b). You can
> do, for example,
> dataset resample 100
> # do stuff
> dataset restore
> The "dataset restore" command will attempt to re-establish the
> original dataset. Modified values of scalar variables and newly
> added scalars will be carried back, but any series added while
> resampled will be discarded (as will any changes to pre-existing
> series values).
> I'm not going to document this for the 1.7.4 release because I
> consider it experimental. Meanwhile I'd appreciate if people
> can test this feature. Here's a little sample script:
> open data4-1
> scalar x = 4
> ols 1 0 2
> # over-sampling: the original dataset has n = 14
> dataset resample 200
> genr newseries = normal()
> ols 1 0 2 ess = $ess x = 5
> dataset restore
> print -o # note: 'newseries' is gone
> print x ess # new scalar values are preserved
> Gretl-devel mailing list
A while back, Andreas asked that the facility for resampling (with
replacement) the entire dataset be (a) documented, and (b) make
In current CVS and Windows snapshot I have implemented (b). You
can do, for example,
dataset resample 100
# do stuff
The "dataset restore" command will attempt to re-establish the
original dataset. Modified values of scalar variables and newly
added scalars will be carried back, but any series added while
resampled will be discarded (as will any changes to pre-existing
I'm not going to document this for the 1.7.4 release because I
consider it experimental. Meanwhile I'd appreciate if people
can test this feature. Here's a little sample script:
scalar x = 4
ols 1 0 2
# over-sampling: the original dataset has n = 14
dataset resample 200
genr newseries = normal()
ols 1 0 2
ess = $ess
x = 5
print -o # note: 'newseries' is gone
print x ess # new scalar values are preserved
-----BEGIN PGP SIGNED MESSAGE-----
I would like you to please reproduce this fault of not being able to
rotate a 3D plot from Gretl 1.7.3 in Windows. The pointer changes to the
rotating arrows, but no motion happens on the plot.
The GNUPlot version in Gretl 1.7.3 is 4.3 (developer's version?), and I
did test with version 4.0 where the feature works fine.
I didn't manage to install version 4.2.3 in Linux, something is wrong
with the tar.gz file.
I really like this feature. I use it to show my friends that Gretl can
produce nice graphs better than SPSS :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
i wonder if it possible to get mentioned criteria as integers for further
manipulation, i know that there is criteria command, but it calculates all
three and the output is not the int, i need to build a script which will
automatically choose the best model based on selected criterion. I will be
truly thankful for any help.
And as it my first post to this mailing-list... hello everybody :)