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

. 
. * Output for TABLE 8 (except non-negligible shares, see below)
. est clear

. qui: eststo: estpost summ h f f_liq f_illiq nw_liq nw_illiq [aw=rwtall] if (xnriw==1), det

. esttab ., ///
>         cells("p25(fmt(%4.0fc)) p50 p75 p90 p95") nonum mlab(none) noobs varwidth(24) compress ///
>         coeflab(h  "Housing wealth (T-1)" ///
>                 f  "Non-housing wealth (T-1)" ///
>                                         f_liq " Of which: Liquid" ///
>                                         f_illiq " Of which: Illiquid" ///
>                                         nw_liq "Liquid wealth" ///
>                                         nw_illiq "Illiquid wealth" ///
>                 )

--------------------------------------------------------------------------
                               p25       p50       p75       p90       p95
--------------------------------------------------------------------------
Housing wealth (T-1)             0         0       104       230       365
Non-housing wealth (T-1)         0         5        87       352       643
 Of which: Liquid                0         2        58       239       493
 Of which: Illiquid              0         0         5        24       141
Liquid wealth                    0         2        58       239       493
Illiquid wealth                  0         9       136       300       521
--------------------------------------------------------------------------

. 
. * TABLE 8:
. /*
> --------------------------------------------------------------------------
>                                p25       p50       p75       p90       p95
> --------------------------------------------------------------------------
> Housing wealth (T-1)             0         0       104       230       365
> Non-housing wealth (T-1)         0         5        87       352       643
>  Of which: Liquid                0         2        58       239       493
>  Of which: Illiquid              0         0         5        24       141
> Liquid wealth                    0         2        58       239       493
> Illiquid wealth                  0         9       136       300       521
> --------------------------------------------------------------------------
> */                                      
.                                         
.                                         
. * Output for TABLE 7 (except non-negligible shares, see below)          
. est clear

. qui: eststo: estpost summ e [aw=crwtall] if (xIW==1), det

. esttab ., ///
>         cells("p25(fmt(%4.0fc)) p50 p75 p90 p95") nonum mlab(none) noobs varwidth(24) compress ///
>         coeflab(e "Estate value")                                       

--------------------------------------------------------------------------
                               p25       p50       p75       p90       p95
--------------------------------------------------------------------------
Estate value                     0        22       198       521       806
--------------------------------------------------------------------------

.         
. * TABLE 7
. /*
> --------------------------------------------------------------------------
>                                p25       p50       p75       p90       p95
> --------------------------------------------------------------------------
> Estate value                     0        22       198       521       806
> --------------------------------------------------------------------------
> */                      
.         
.         
. * Non-negligible shares for TABLE 8:    
. 
. foreach var in h f f_liq f_illiq nw_liq nw_illiq {
  2. 
.   qui: gen tmp = (~(`var' <= 15)) if !mi(`var')
  3.         qui: summ tmp [aw=rwtall] if (xnriw==1)
  4. 
.   di "Prob( `var' <= 15 ) = "  %3.2f r(mean)
  5.         
.         drop tmp
  6. }       
Prob( h <= 15 ) = 0.45
Prob( f <= 15 ) = 0.41
Prob( f_liq <= 15 ) = 0.37
Prob( f_illiq <= 15 ) = 0.13
Prob( nw_liq <= 15 ) = 0.37
Prob( nw_illiq <= 15 ) = 0.48

. 
. 
. /*
> Prob( h <= 15 ) = 0.45            Table 8: Data, housing, non-negligible share
> Prob( f <= 15 ) = 0.41            Table 8: Data, non-housing, non-negligible share
> Prob( f_liq <= 15 ) = 0.37        Table 8: Data, liquid non-housing, non-negligible share
> Prob( f_illiq <= 15 ) = 0.13      Table 8: Data, illiquid non-housing, non-negligible share
> Prob( nw_liq <= 15 ) = 0.37       Table 8: Data, liquid net worth, non-negligible share
> Prob( nw_illiq <= 15 ) = 0.48     Table 8: Data, illiquid net worth, non-negligible share
> */
. 
. 
. * Non-negligible share for TABLE 7:
. 
. qui: gen tmp = (~(e <= 15)) if !mi(e)

. qui: summ tmp [aw=crwtall] if (xIW==1)

.         
. di "Prob( estate <= 15 ) = " %3.2f r(mean)
Prob( estate <= 15 ) = 0.51

.         
. drop tmp

. 
. /*
> Prob( estate <= 15 ) = 0.51       TABLE 7: Data, bequest distribution, non-negligible share
> */
. 
. restore

. 
. * close log
. cap log close
