This post probably targeted at Stata developers, but is posted here for public discussion as well:
The following produces an error 198 "May not label ."
However the following works:
Produces the following label dictionary:
Produces dataset:
The value label for a dot is present in the dictionary, and is saved with the data into a file. But it is not displayed.
Interestingly if I attempt
it produces an error, so that one has to:
This behavior looks somewhat inconsistent to me.
1) Shouldn't the value 2147483621 be banned as well? Or
2) Shouldn't the values 2147483622 and above be accepted and automatically recoded into .a...z?
3) If the label for a dot gets defined (one way or another), shouldn't it be applied when listing the data?
4) Will the files containing such a value label continue to be opened by Stata in the future?
Thank you, Sergiy Radyakin
The following produces an error 198 "May not label ."
Code:
label define dottest . "is a dot"
However the following works:
Code:
label define dottest 2147483621 "is a dot" 0 "is zero" set obs 2 generate long x=2147483621 replace x=0 in 2 label values x dottest
Code:
dottest: 0 is zero . is a dot
Code:
+---------+ | x | |---------| 1. | . | 2. | is zero | +---------+
Interestingly if I attempt
Code:
label define dottest 2147483622 "dot A"
Code:
label define dottest .a "dot A"
1) Shouldn't the value 2147483621 be banned as well? Or
2) Shouldn't the values 2147483622 and above be accepted and automatically recoded into .a...z?
3) If the label for a dot gets defined (one way or another), shouldn't it be applied when listing the data?
4) Will the files containing such a value label continue to be opened by Stata in the future?
Thank you, Sergiy Radyakin
Comment