I don't know if this is a bug or a missing feature, but as the following
output tells, one can use the boolean expression X = 1 but not the combined
expression X = 1 & Y = 2 for matrices.
? X = ones(5,1)
Generated matrix X
? Y = X + 1
Generated matrix Y
? Z = (X = 1)
Generated matrix Z
? Z = (X = 1 & Y = 2)
Data types not conformable for operation
This is on Windows XP using version 1.6.6pre1 build date 09/18/2007
If it is a missing feature, please do implement it, so that the the
combined expression X = 1 & Y = 2 can be used for matrices
A second bug or missing feature: I want to initiate a matrix with missing
values, where some cells with missing values will later be replaced with
non-missing values. I got the following result when trying to initiate a
matrix with missing values:
? A = {NA, NA; NA, NA}
Generated matrix A
? A
A (2 x 2)
1.7977e+308 1.7977e+308
1.7977e+308 1.7977e+308
Third, I have a few feature requests:
1. It should be possible to use the xtab command with nx1 matrices, i.e.
the inputs are matrix vectors
2. The xtab command should be able to take a nxn matrix with discrete
values as input an calculate a cross table from this, where this matrix is
the inner square matrix of the cross table (i.e. the cross table except the
marginals)
3. After calculating a cross classification table from View > Cross
Tabulation in the GUI, one gets the possibility to save the output table as
a matrix. This feature should be available also from the command line
interface.
4. The parameterts of a function can currently be of six types: bool, int,
scalar, series, list, matrix. Please include a third type "discrete" or
"disc" for a discrete data series
5. Create a new boolean command isdiscrete() to check if a series or matrix
contains only discrete values, with outputs 1 if it is discrete and 0
otherwise.
Fourth, I have a suggestion and possibly feature request: To check that a
variable is discrete, accoriding to the User's Guide gretl currently checks
that all values are integer multiples of 0.25 and that the variable takes
on a “fairly small” set of distinct values, where “fairly small” is defined
as less than or equal to 8. Would it possible to use a more exact method?
For example, I use
if sum(foo-int(foo))=0
discrete foo
endif
Best regards and thanks for a great software,
Andreas