Announcement

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

  • How to deal with missing values of categorical variables

    Dear scholar
    i am using the demographic surveys. Some data about the Children's nationality are missing. I do not really want to just drop it. I was trying to find their parents' nationality to make it. Because i just classify the nationality into minorities and majorities. But it seems negligible. The survey is from 1991-2015. maybe i can find this child's nationality from the following waves.

    However, at the same time, i am using the panel data, the time period is also 1991-2015. I am really not sure on how to find the following nationality of this child.

    Hope to receive your reply. Thanks!

  • #2
    that really depends on the exact structure of your data. Can you give us an example using dataex (see https://www.statalist.org/forums/help#stata and help dataex)?
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Sure, thanks. It is panel data.

      ----------------------- copy starting from the next line -----------------------
      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input double(Idind wave NATIONALITY)
      372302006022 1991 1
      522303041006 1997 2
      372304044004 1997 1
      452404011121 2009 1
      412403011121 2009 1
      432301162005 2015 1
      521203019081 2004 2
      432301012142 2011 1
      322302016122 2009 1
      422203042101 2006 1
      112201005003 2011 1
      311204004162 2015 1
      432201041003 1997 1
      412301011141 2011 1
      232404012122 2009 1
      412402041003 1993 1
      451204018142 2011 1
      322103006031 1993 1
      212303061162 2015 2
      422401017031 1993 1
      322403019032 1993 1
      452104006101 2006 1
      452104014141 2011 1
      112104004004 2011 1
      322102007022 1991 1
      422304081004 2004 1
      452303006031 1993 1
      422303014123 2009 1
      552103003006 2011 1
      372102162003 2015 1
      412204002021 1991 1
      322302001162 2015 1
      452102003163 2015 1
      321105017161 2015 1
      322402005122 2009 1
      412404008042 1997 1
      432201017142 2011 1
      522402010041 1997 1
      452204001062 2000 1
      521108161003 2015 2
      452402021122 2009 1
      452301002021 1991 1
      422101084142 2011 1
      452401009061 2000 1
      522404001021 1991 1
      412102121141 2011 1
      322101019022 1991 1
      452103010121 2009 1
      412104162006 2015 1
      372104001161 2015 1
      452102103163 2015 1
      452402003102 2006 1
      321201014083 2004 1
      422303006032 1993 1
      552202007004 2011 1
      452303014162 2015 1
      411108011141 2011 1
      432203031003 1993 1
      312102011003 2011 1
      371108018101 2006 1
      422304101003 2006 1
      322105017101 2006 1
      422401121003 2009 1
      422101014102 2006 1
      452402006142 2011 1
      412202041004 1997 1
      111401014003 2011 1
      451203012161 2015 1
      211102016022 1991 1
      322201015021 1991 1
      232402004102 2006 1
      412303012162 2015 1
      422202041003 1997 1
      211101015021 1991 1
      432301121003 2009 1
      522103002082 2004 2
      311201018005 2011 1
      422303016021 1991 1
      212302016101 2006 1
      452302011164 2015 1
      522203007142 2011 2
      322302002142 2011 1
      422304016031 1993 1
      422402001022 1991 1
      551203001006 2011 1
      412403012102 2006 1
      411103082005 1991 1
      432201019083 2004 1
      522202001142 2011 2
      432304014102 2006 1
      422104018032 1993 1
      231103101162 2015 1
      232404004004 1997 1
      431201003032 1993 1
      412304124004 2009 1
      452304141005 2004 1
      522303082004 2000 2
      232404005003 1997 1
      372301011021 1991 1
      422403013032 1993 1
      end
      label values NATIONALITY nationality_label
      label def nationality_label 1 "Han", modify
      label def nationality_label 2 "Min", modify
      ------------------ copy up to and including the previous line ------------------

      Listed 100 out of 4721 observations
      Use the count() option to list more

      Comment

      Working...
      X