Announcement

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

  • No labels of categories in numerical values

    Dear all, I wold like to share with you a doubt.

    I am working on a very small dataset (two variables), and I would like that, when using the data editor, both variables will show as label their actual value (which is one real meaningful value for one variable and a numerical occupational code for the other).

    Here the variables:
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int isco88h float a_13
    121 1.2520453
    122 1.1745726
    123 1.2469904
    131  .9735656
    211 1.3680235
    end
    label values isco88h is883d_VL
    label def is883d_VL 121 "Directors and chief executives", modify
    label def is883d_VL 122 "Production and operations managers", modify
    label def is883d_VL 123 "Other specialist managers", modify
    label def is883d_VL 131 "Managers of small enterprises", modify
    label def is883d_VL 211 "Physicists, chemists and related professionals", modify
    do you know how to obtain it?

    thanks a lot, best, G.

  • #2
    Code:
    help numlabel
    ?

    Comment


    • #3
      Sorry, what should I do with that command? It needs to add a numerical prefix, while I would like to show the Isco code associate to each profession instead of its label.

      Comment


      • #4
        Then I don't think I understand your question. Re-reading #1 I gather that you want to see the labels. Reading #3 it seems that you don't want to see the labels. Which is it?

        Note that list has a nolabel option. So does edit

        With your data I get this:

        Code:
        . list 
        
             +-----------------------------------------------------------+
             |                                        isco88h       a_13 |
             |-----------------------------------------------------------|
          1. |                 Directors and chief executives   1.252045 |
          2. |             Production and operations managers   1.174573 |
          3. |                      Other specialist managers    1.24699 |
          4. |                  Managers of small enterprises   .9735656 |
          5. | Physicists, chemists and related professionals   1.368024 |
             +-----------------------------------------------------------+
        
        . list, nolabel 
        
             +--------------------+
             | isco88h       a_13 |
             |--------------------|
          1. |     121   1.252045 |
          2. |     122   1.174573 |
          3. |     123    1.24699 |
          4. |     131   .9735656 |
          5. |     211   1.368024 |
             +--------------------+
        
        . numlabel is883d_VL, add
        
        . list
        
             +----------------------------------------------------------------+
             |                                             isco88h       a_13 |
             |----------------------------------------------------------------|
          1. |                 121. Directors and chief executives   1.252045 |
          2. |             122. Production and operations managers   1.174573 |
          3. |                      123. Other specialist managers    1.24699 |
          4. |                  131. Managers of small enterprises   .9735656 |
          5. | 211. Physicists, chemists and related professionals   1.368024 |
             +----------------------------------------------------------------+
        The point about numlabel is that you see both.



        Comment


        • #5
          Dear Nick,
          thanks a lot for your always useful explanation, probably I was not able to make me understood.

          Anyway, what I was looking for was the command -_strip_labels - , which just rule out the labels. But what you explained it is very interesting as well!

          Thanks again, best, G.

          Comment

          Working...
          X