Announcement

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

  • Yao Zhao
    started a topic how to label missing values?

    how to label missing values?

    Code:
    tabulate q14, missing
    Q14 Buying a |
    single |
    company’s |
    stock usually |
    provides a |
    safer return |
    than a stock | Freq. Percent Cum.
    ---------------+-----------------------------------
    Correct Answer | 505 60.05 60.05
    Wrong Answer | 33 3.92 63.97
    . | 303 36.03 100.00
    ---------------+-----------------------------------
    Total | 841 100.00
    Code:
    label define q14 0 "Correct Answer" ///
                     1 "Wrong Answer" ///
                     . "Don't Know"
    may not label .

  • Scott Merryman
    replied
    see:
    Code:
    help missing

    Leave a comment:


  • Yao Zhao
    replied
    Could you explain what's the meaning of extended missing and default system missing values?

    I guess default system missing values are: when we type in data, some cells are left blank. They are default system missing values, right?

    Leave a comment:


  • Scott Merryman
    replied
    Value labels can only to be attached to extended missing not the default system missing values:

    Code:
    . sysuse auto,clear
    (1978 Automobile Data)
    
    . recode rep (missing = .a)
    (rep78: 5 changes made)
    
    . label define lab .a "missing"
    
    . label values rep lab
    
    . tab rep,missing
    
         Repair |
    Record 1978 |      Freq.     Percent        Cum.
    ------------+-----------------------------------
              1 |          2        2.70        2.70
              2 |          8       10.81       13.51
              3 |         30       40.54       54.05
              4 |         18       24.32       78.38
              5 |         11       14.86       93.24
        missing |          5        6.76      100.00
    ------------+-----------------------------------
          Total |         74      100.00

    Leave a comment:

Working...
X