I am working with the following paneldata and want to drop all observations of which I have less than six observations per Household ID (Variable cpsid, which is the household ID of the panel). I filtered the data previously in a way that there are only heterosexual married couples in the sample that took the panel in sept, oct. and nov.. Now I want to keep only the households in which I have both parents- ie. for which I have the household ID six times, two times each month.
I hope this explanation helps understand what I am trying to do, if not, feel free to let me know what is unclear.
Thanks in advance!
Sophie
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double cpsid int year byte month 20190800045200 2020 9 20190800045200 2020 10 20190800045200 2020 11 20190800062500 2020 9 20190800062500 2020 10 20190800062500 2020 11 20190800062500 2020 9 20190800062500 2020 10 20190800062500 2020 11 20190800063700 2020 9 20190800063700 2020 10 20190800063700 2020 11 20190800090700 2020 9 20190800090700 2020 10 20190800090700 2020 11 20190800093600 2020 9 20190800093600 2020 10 20190800093600 2020 11 20190800093600 2020 9 20190800093600 2020 10 20190800093600 2020 11 20190800094600 2020 9 20190800094600 2020 10 20190800094600 2020 11 20190800106300 2020 9 20190800106300 2020 10 20190800106300 2020 11 20190800129700 2020 9 20190800129700 2020 10 20190800129700 2020 11 20190800129700 2020 9 20190800129700 2020 10 20190800129700 2020 11 20190800134100 2020 9 20190800134100 2020 10 20190800134100 2020 11 20190800134100 2020 9 20190800134100 2020 10 20190800134100 2020 11 20190800139100 2020 9 20190800139100 2020 10 20190800139100 2020 11 20190800139100 2020 9 20190800139100 2020 10 20190800139100 2020 11 20190800140400 2020 9 20190800140400 2020 10 20190800140400 2020 11 20190800208400 2020 9 20190800208400 2020 10 20190800208400 2020 11 20190800208400 2020 9 20190800208400 2020 10 20190800208400 2020 11 20190800250100 2020 9 20190800250100 2020 10 20190800250100 2020 11 20190800278200 2020 9 20190800278200 2020 10 20190800278200 2020 11 20190800278200 2020 9 20190800278200 2020 10 20190800278200 2020 11 20190800282000 2020 9 20190800282000 2020 10 20190800282000 2020 11 20190800285400 2020 9 20190800285400 2020 10 20190800285400 2020 11 20190800295700 2020 9 20190800295700 2020 10 20190800295700 2020 11 20190800295700 2020 9 20190800295700 2020 10 20190800295700 2020 11 20190800299400 2020 9 20190800299400 2020 10 20190800299400 2020 11 20190800321300 2020 9 20190800321300 2020 10 20190800321300 2020 11 20190800337700 2020 9 20190800337700 2020 10 20190800337700 2020 11 20190800351200 2020 9 20190800351200 2020 10 20190800351200 2020 11 20190800351200 2020 9 20190800351200 2020 10 20190800351200 2020 11 20190800363600 2020 9 20190800363600 2020 10 20190800363600 2020 11 20190800363600 2020 9 20190800363600 2020 10 20190800363600 2020 11 20190800364000 2020 9 20190800364000 2020 10 20190800364000 2020 11 20190800364000 2020 9 end label values month MONTH label def MONTH 9 "september", modify label def MONTH 10 "october", modify label def MONTH 11 "november", modify
0 Response to Dropping Observations of Variable according to frequency of occurence
Post a Comment