On Sun, Apr 22, 2018 at 12:46 PM, Sven Schreiber <svetosch(a)gmx.net> wrote:
Hi,
shouldn't this work:
<hansl>
open CEL.gdt
series d = $unit
list a = dummify(d) # works
list b = dummify($unit) # fails, datatype mismatch
</hansl>
I guess the problem is that dummify needs a series name for the labels of
the dummies? But still...
Not just the labels of the dummies, but also their names. Functions of this
sort (that return a list of series derivative from some original series) require
that the original series be a member of the current dataset, with a name and
ID number.
In the case of $unit (index of panel-data cross-sectional units), however,
there's already an automated way of generating a set of dummy variables
without adding $unit to the dataset under a user-specified name: it's
genr unitdum
Allin