Announcement

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

  • Numerical values of categories of a variable

    Hi!! I have the variable named npcep11ac , which takes multiple values. When I use tab, I can see the different (qualitative) names assigned to the different categories of the variable. Yet, what I want to is to get the underlying numbers that each of those categories represent. The variable is already numerical, because when I browse I see that the names of those categories appear on blue.


    How can i do to obtain, the numbers of each category, instead of the names of the categories?

    Thanks for your help!

    Click image for larger version

Name:	npcep11ac.jpg
Views:	1
Size:	100.1 KB
ID:	1707681


  • #2
    Code:
    lab list `:val lab npcep11ac'

    Comment


    • #3
      Thank you Andrew!!!

      Comment


      • #4
        Not quite the question, but possibly important for the OP. It seems from the example in #1 that string values have been pushed through encode. The problem here is that encode is not, and cannot be, a smart research assistant on your behalf. It takes slight differences utterly literally.

        Thus my bet is that BRASIL and BRAZIL have the same meaning in terms of your research as do CARACAS and CARACAS VENEZUELA and BARCELONA and BARCELONA ESPANA. Is AHITI meant to be HAITI or TAHITI?

        There aren't easy solutions for this problem, as many researchers have experienced to their chagrin.

        Comment

        Working...
        X