-------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/seanfahle/Dropbox/BequestModel/REStud/REStudPublication/SSG_Code_REStud/Stata/Code/../Output/logs/TABA1_SAMPLE_COUNTS_1
> .txt
  log type:  text
 opened on:  30 Jun 2022, 16:50:00

. log off // turn off
      name:  <unnamed>
       log:  /Users/seanfahle/Dropbox/BequestModel/REStud/REStudPublication/SSG_Code_REStud/Stata/Code/../Output/logs/TABA1_SAMPLE_COUNTS_1
> .txt
  log type:  text
 paused on:  30 Jun 2022, 16:50:00
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/seanfahle/Dropbox/BequestModel/REStud/REStudPublication/SSG_Code_REStud/Stata/Code/../Output/logs/TABA1_SAMPLE_COUNTS_1
> .txt
  log type:  text
resumed on:  30 Jun 2022, 16:50:18

. 
. unique HHID PN if (riwstat==1)
Number of unique values of HHID PN is  37495
Number of records is  226563

. /*
> Number of unique values of HHID PN is  37495
> Number of records is  226563
> */
. unique HHID if (riwstat==1)
Number of unique values of HHID is  23373
Number of records is  226563

. /*
> Number of unique values of HHID is  23373
> Number of records is  226563
> */
. 
. keep if w>=4  // begin with year 1998
(112,485 observations deleted)

. 
. sort HHID PN w

. order HHID PN w 

. 
. unique HHID PN // -> 37,495 unique individuals
Number of unique values of HHID PN is  37495
Number of records is  337455

. 
. unique HHID PN if (riwstat==1 & inrange(w,4,10))
Number of unique values of HHID PN is  32973
Number of records is  136977

. /*
> Number of unique values of HHID PN is  32973
> Number of records is  136977
> */
. 
. unique HHID if (riwstat==1 & inrange(w,4,10))
Number of unique values of HHID is  21211
Number of records is  136977

. /*
> Number of unique values of HHID is  21211
> Number of records is  136977
> */
. 
. * pause logging
. log off
      name:  <unnamed>
       log:  /Users/seanfahle/Dropbox/BequestModel/REStud/REStudPublication/SSG_Code_REStud/Stata/Code/../Output/logs/TABA1_SAMPLE_COUNTS_1
> .txt
  log type:  text
 paused on:  30 Jun 2022, 16:50:21
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/seanfahle/Dropbox/BequestModel/REStud/REStudPublication/SSG_Code_REStud/Stata/Code/../Output/logs/TABA1_SAMPLE_COUNTS_1
> .txt
  log type:  text
resumed on:  30 Jun 2022, 16:50:41

. 
. * Individuals
. unique hhid pn                 // ->  37,495 unique individuals
Number of unique values of hhid pn is  37495
Number of records is  262465

. unique hhid pn if (riwstat==1) // ->  32,973 unique individuals with data in core waves 4-10
Number of unique values of hhid pn is  32973
Number of records is  136977

. count if (riwstat==1)          // -> 136,977 unique observations
  136,977

. 
. * Households
. unique hhid pn if (hpickhh==1)     // -> 24,100 unique households (with data in core waves 4-10)
Number of unique values of hhid pn is  24100
Number of records is  93385

.                                    // (may be inaccurate if selected HH member changes between waves)
. count if (hpickhh==1 & riwstat==1) // -> 93,385 unique observations
  93,385

. 
. * Parents
. unique hhid pn if (nochild==0) & (riwstat==1)                    // -> 30,181 unique ever parents
Number of unique values of hhid pn is  30181
Number of records is  125318

. unique hhid pn if (everChild==1 & everNoChild==0) & (riwstat==1) // -> 29,835 unique always parents
Number of unique values of hhid pn is  29835
Number of records is  125831

. 
. * Childless
. unique hhid pn if (nochild==1) & (riwstat==1)                    // ->  2,913 unique ever childless
Number of unique values of hhid pn is  2913
Number of records is  9583

. unique hhid pn if (everChild==0 & everNoChild==1) & (riwstat==1) // ->  2,567 unique always childless
Number of unique values of hhid pn is  2567
Number of records is  8862

. 
. * Ambiguous cases
. unique hhid pn if (everChild==1 & everNoChild==1) & (riwstat==1) // ->    346 both parent/childless
Number of unique values of hhid pn is  346
Number of records is  1823

. unique hhid pn if (everChild~=1 & everNoChild~=1) & (riwstat==1) // ->    225 neither parent/childless
Number of unique values of hhid pn is  225
Number of records is  461

. 
. di 29835 + 2567 + 346 + 225 // -> 32,973
32973

. di 30181 + 2913 - 346 + 225 // -> 32,973
32973

. 
. * close log
. cap log close
