On Fri, 1 Aug 2008, Gordon Hughes wrote:
I have been experimenting with the use of dummify in a function
to provide the equivalent of pmean for an unbalanced panel.
The documentation says that the command
list plist = dummify(punit)
should create dummy variables for all values of punit - in my
test, punit takes values 1 to 9. In fact, it creates dummies
for values 2 to 9 only. Further, it fails to recognise the
options --drop-first or --drop-last.
OK, I accept that this may be a bit confusing, and should be
clarified, but if you distinguish between (a) the dummify command
and (b) the dummify function, I believe you'll find that each one
does what the (respective) documentation says.
You are criticizing the dummify function for not doing what the
dummify _command_ is said to do. Notice that no _functions_
respond to "--style" options, that's stricly a command thing.
From the gretl function help for dummify:
"The argument x should be a discrete series, or list of such
series. This function creates a set of dummy variables coding for
the distinct values in the series; the smallest value is taken as
the omitted category and is not explicitly represented."