Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Recoding open-ended answers into a category for education

    Hello,
    Do you have a suggestion as to the best way to move open-ended text answers for education into a defined category?
    For example, I have two respondents who chose "other" and typed in "Business College" and "Johnson Business /Secretarial School"
    - upon investigation of these two answers, they should be coded into the 4th category of my educ var (vocational)

    I generated a new educ var
    gen educ=EDUC
    then replaced:
    replace educ = EDUC[4] if EDUC_TEXT=="Business College" // ** this coded the respondent into my 6th educ category and not my 4th educ category **

    Can anyone direct me how to do this? I am unsure what the "EDUC[4]" portion of my syntax is supposed to and I can't find anything about it.

    Thank you!

  • #2
    Code:
    replace educ = EDUC[4] if ...
    refers to the value of in 4th observation in EDUC, which seems to be 6. You want

    Code:
    replace educ = 4 if ...
    Best
    Daniel

    Comment


    • #3
      Interesting, thank you so much!! I appreciate your help!

      Comment

      Working...
      X