Hi, I'm stuck on a question for part 2 e of the midterm:
// e. Recode the hivstatus variable so that 0=HIV Negative, 1=HIV Positive, and .=Excluded Record (missing). (2 pts)
When I try the following code
encode hivstatus, generate(hivstatus_categ)
label define hivstatus_def 0 "HIV Negative" 1 "HIV Positive" . "Excluded Record (missing)" // define labels
I get an error that ". cannot be labeled." From googling, it seems the system missing value of . cannot be labeled. If that is the case, how would we achieve the labeling requested by the question?