* A program to run some regressions on the 1986 SCF so that I can * predict charitable contributions for the 1983 SCF. The data is * created in taxsimscf83.sas SAS program * KM 3/02 clear capture log close set more off set matsize 100 #delimit; log using "/fin/scf5/outside/taxsim/pgm/charity86", replace text; * Read in 83 data from flatfile; infile v1 wgt ragecl1 ragecl2 ragecl3 ragecl4 ragecl5 ragecl6 rsex married numhh netwcl1 netwcl2 netwcl3 netwcl4 netwcl5 netwcl6 inccl1 inccl2 inccl3 inccl4 inccl5 edcl1 edcl2 edcl3 edcl4 rworks spworks white hisamp homown using "/fin/scf5/outside/taxsim/data/input/charit83.raw"; save "/fin/scf5/outside/taxsim/data/input/charit83", replace; summarize [w=wgt]; *tab1 ragecl1 ragecl2 ragecl3 ragecl4 ragecl5 ragecl6 rsex married numhh netwcl1 netwcl2 netwcl3 netwcl4 netwcl5 netwcl6 inccl1 inccl2 inccl3 inccl4 inccl5 edcl1 edcl2 edcl3 edcl4 rworks spworks white hisamp homown; * Read in 86 data from flatfile; clear; infile wgt nwgt mwgt tcharityamt ragecl1 ragecl2 ragecl3 ragecl4 ragecl5 ragecl6 rsex married numhh netwcl1 netwcl2 netwcl3 netwcl4 netwcl5 netwcl6 inccl1 inccl2 inccl3 inccl4 inccl5 edcl1 edcl2 edcl3 edcl4 rworks spworks white hisamp homown using "/fin/scf5/outside/taxsim/data/input/charit86.raw"; save "/fin/scf5/outside/taxsim/data/input/charit86", replace; summarize wgt nwgt mwgt; gen gcharity=(tcharityamt > 0); summarize tcharityamt [w=wgt] if gcharity==1, detail; summarize [w=wgt]; tabulate gcharity hisamp, row col; tabulate gcharity hisamp [fw=wgt], row col; * Tried the tobit and robust regression, the results were not very good, both models underpredicted the number of hhs donating to charity, and the mean and aggregate amounts were too high. OLS by itself was also problematic, so using a sort of psuedo sample selection model. First estimate the probit on the 86 data and then use the coefficients to predict the probability of donating to charity in the 83 data. Setting the cut point for hhs that donate in 83 to match the weighted proportion in the 86 data (about 55%). Next run OLS on the 86 data and use those coefficients to predict the amount donated to charity for hhs that donate to charity in 1983. This procedure seems to produce reasonable estimates of the proportion and amount of charitable contributions in 83, based on comparisons with the IRS tables. I am not worrying about selection issues because I am artifically setting the selection criteria (the gcharity probability threshold); dprobit gcharity inccl2 inccl3 inccl4 inccl5 netwcl2 netwcl3 netwcl4 netwcl5 netwcl6 ragecl2 ragecl3 ragecl4 ragecl5 ragecl6 rsex married numhh edcl2 edcl3 edcl4 rworks spworks white homown [pw=nwgt]; probit; * Predict gcharity for 1983 data; use "/fin/scf5/outside/taxsim/data/input/charit83", clear; predict gcharity; summarize gcharity, detail; * Setting cut point for donating to charity to produce the same proportion in 1983 that donated in 1986; replace gcharity=1 if gcharity > .49; replace gcharity=0 if gcharity <= .49; tabulate gcharity; tabulate gcharity [w=wgt]; save "/fin/scf5/outside/taxsim/data/input/charit83", replace; * Run OLS on 1986 data; use "/fin/scf5/outside/taxsim/data/input/charit86", clear; regress tcharityamt inccl2 inccl3 inccl4 inccl5 netwcl2 netwcl3 netwcl4 netwcl5 netwcl6 ragecl2 ragecl3 ragecl4 ragecl5 ragecl6 rsex married numhh edcl2 edcl3 edcl4 rworks spworks white hisamp homown [w=nwgt]; * Predict tcharityamt for 1983 hhs who donate to charity; use "/fin/scf5/outside/taxsim/data/input/charit83", clear; predict tcharityamt if gcharity==1; replace tcharityamt=0 if (gcharity==0 | tcharityamt <=0); replace gcharity=0 if tcharityamt <=0; summarize tcharityamt [w=wgt] if gcharity==1, detail; tabulate gcharity hisamp; * Output the predicted values to a dataset for SAS; outfile v1 gcharity tcharityamt using "/fin/scf5/outside/taxsim/data/input/echart83.raw", replace; #delimit cr clear capture log close exit, STATA