Project

General

Profile

Actions

Support #2087

open

Values coded as -20 in sex_dv

Added by Luis Ortiz 8 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Normal
Category:
Derived variables
Start date:
04/16/2024
% Done:

100%


Description

Dear colleague,

I have proceeded to re-run my do-files to add Wave 13 to my dataset for analysis, profiting from the recent incorporation of this new wave to Understanding Society.

After merging and appending data from different individual and household files, when I ask for a table of frequencies of gender across waves, I get a strange (and substantially large) number of cases in a category -20 that does not appear among the possible codes of missing values in the variable.

. tab wave sex_dv, miss

           |                           Sex, derived
      wave |       -20    missing  inconsist       Male     Female          . |     Total
-----------+------------------------------------------------------------------+----------
         1 |         0          0          2     23,202     27,790          0 |    50,994 
         2 |         0          0          1     25,025     29,541          2 |    54,569 
         3 |         0          0          1     22,763     26,928          0 |    49,692 
         4 |         0          0          2     21,744     25,328          0 |    47,074 
         5 |         0          0          3     20,773     24,061          0 |    44,837 
         6 |         0          0          9     20,921     24,260          2 |    45,192 
         7 |         0          0          1     19,429     22,740          0 |    42,170 
         8 |         0          0          3     17,922     21,369          0 |    39,294 
         9 |         0          0          1     16,226     19,830          1 |    36,058 
        10 |         0          0          2     15,381     18,934          2 |    34,319 
        11 |         0          0          3     14,260     17,743          2 |    32,008 
        12 |         0          0          4     12,921     16,344          2 |    29,271 
        13 |         0          0          1     12,408     15,588          1 |    27,998 
         . |    26,847         52         19     18,851     16,147          0 |    61,916 
-----------+------------------------------------------------------------------+----------
     Total |    26,847         52         52    261,826    306,603         12 |   595,392 

Could you, please, help me understand this code?

Many thanks for your help

Kidn regards

Luis Ortiz

Actions #1

Updated by Understanding Society User Support Team 8 months ago

  • Category set to Derived variables
  • Status changed from New to Feedback
  • % Done changed from 0 to 90
  • Private changed from Yes to No

Hi Luis,

-20 is a missing value used only in xwavedat, it is assigned to the BHPS participants who didn't continue into UKHLS (therefore the value label says "no data from bhps ", this is also reflected in the fact that they have "." on your wave variable). You can run the following snippet to understand this better:

use xwavedat, clear
fre lwenum_dv lwintvd_dv lwenum_dv_bh lwintvd_dv_bh if sex_dv==-20

Best wishes,
Piotr Marzec
UKHLS User Support

Actions #2

Updated by Luis Ortiz 8 months ago

Thanks for such a swift, clear and reassuring answer, Piotr.

Best

Luis

Actions #3

Updated by Understanding Society User Support Team 8 months ago

  • Status changed from Feedback to Resolved
  • % Done changed from 90 to 100
Actions

Also available in: Atom PDF