Announcement

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

  • Occupation categoization according to STEM definition

    Hello stata community,

    I believe I'm having trouble coding the occupation of IPUMS CPS dataset according to the definition of STEM in an efficient way ? Could anyone kindly help me to code it up in a less time consuming method or provide me some insight how can I do it ?

    They have plenty of category for occupation , if I have to do it one by on that will just take too much time and therefore asking for the kind guidance of any person who is experienced with this matter.

    Example generated by -dataex-. For more info, type help dataex
    clear
    input int occ90ly

    label values occ90ly occ90ly_lbl
    label def occ90ly_lbl 276 "Cashiers", modify
    label def occ90ly_lbl 453 "Janitors", modify
    label def occ90ly_lbl 479 "Farm workers", modify
    label def occ90ly_lbl 567 "Carpenters", modify
    label def occ90ly_lbl 999 "NIU", modify


  • #2
    It's actually very easy if you have access to the original codebook table. Like this one (https://cps.ipums.org/cps-action/var...#codes_section). Simply copy and paste that onto a spreadsheet software such as MS Excel, briefly tidying it up and save as xlsx. Import that into Stata, and clean up the rest. Then you'll have a .dta "crosswalk" file. Merge that with the job code and the description will also be merged. (I've made that crosswalk using the codes from the web page, that's OCC90LY and should be what you need.)

    However, I'm not sure that would achieve what you want. Whether a job is STEM or not may still need some subjective decision. You can use code such as:
    Code:
    gen stem = 0
    replace stem = 1 if inlist(code, 7, 15, 25, 26)
    to code the STEM jobs.
    Attached Files

    Comment


    • #3
      I really can't express my gratitude how insightful this feedback was for my understanding. Much appreciated for such kind and well detailed information ! This works and hopefully anyone in future has the same issue will be able to follow the instruction too ! Thanks so much !

      Comment

      Working...
      X