[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: RE: RE: dealing with multiple alphanumeric responses [correction]
I wrote in response to Tom Steichen
> > Something of the form
> > . for any A B C D E F G H I: gen v_X=index(var, "X") \ replace
> > v_X=1 if v_X>1
> > where A B C D E F G H I is the list of possible alpha characters
> > and var is the variable of interest
> > will generate individual numeric (0,1) variables for each alpha code
> > that can then be tabulated with the usual tabulation commands.
> > Tom
> There's a small slip in Tom's code here.
> He meant
> . for any A B C D E F G H I: gen v_X=index(var, "X") \ replace
> v_X=1 if v_X>0
> because otherwise all occurrences in the first column will
> be ignored.
Actually, _this_ slip is all mine, as if -v_X- is already
1 then the -replace- is redundant, as Tom clearly saw.
Apologies to him.
The rest of my posting still holds, I believe.
* For searches and help try: