Good afternoon.
1) I have a series X characterized as discrete, with 9 unique values,
one of them negative the other positive. When I execute
dummify X
I get all 9 dummies that the command should produce.
I found out that I can also execute
list dumXlist = dummify(X)
...but in which case the command does not produce the dummy_1, related
to the negative value, and so the dumXlist contains only 8 dummies.
Note: the dummies that are produced are labelled correctly, namely their
names start from DX_2, DX_3 etc. So Gretl tells me "I know there is one
more dummy in there, but I won't create it"... is this a bug?
I want to use the command "list" because the whole thing will be inside
a loop.
2) I was unable to determine the combination of Gretl commands that will
give me the following:
Let X be a series, X(i), i=1,...,n. I want to create the following series
Y(i) = "the immediately smaller value than X(i) in the X series".
(If the Y series is created using a loop, I guess I can deal with what
happens when X(i) is the minimum value in the series by an "if" command)
E.g. if the X series has unique values {-3, -1, 5, 17}, then X(i)
= 5 => Y(i) = -1, X(j) = -1 => Y(j) = -3, etc.
I would much appreciate any ideas.
--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web:
alecospapadopoulos.wordpress.com/