--------------------------------------------------------------------------------- log: C:\Documents and Settings\agailey\Desktop\hyp_mata\wealth_ahg.log log type: text opened on: 18 Jun 2008, 11:21:43 . . set more off . set mem 100m (102400k) . . use hatota black hispan male hsless college widowed using \\homer\homer_c\Retir > e\ahg\age5055_hrs1992r_v9.dta , clear . ghreg hatota black hispan male hsless college widowed Maximizing concentrated likelihood: Iteration 0: f(p) = -33556.558 Iteration 1: f(p) = -33468.197 Iteration 2: f(p) = -33411.339 Iteration 3: f(p) = -33132.03 Iteration 4: f(p) = -33034.936 Iteration 5: f(p) = -32972.793 Iteration 6: f(p) = -32972.793 Iteration 7: f(p) = -32972.793 Iteration 8: f(p) = -32972.793 Iteration 9: f(p) = -32972.793 Iteration 10: f(p) = -32972.793 Iteration 11: f(p) = -32971.9 Iteration 12: f(p) = -32971.9 Iteration 13: f(p) = -32971.9 Iteration 14: f(p) = -32971.9 Iteration 15: f(p) = -32971.887 Iteration 16: f(p) = -32971.887 Iteration 17: f(p) = -32971.887 Retrieving concentrated parameters: . . noi disp e(theta) -.06943086 . noi disp e(omega) 1.0157633 . . predict yhat3, simu . . . **Compare simulated and actual.** . sum yhat3 hatota, detail Simulated Value of Y ------------------------------------------------------------- Percentiles Smallest 1% -20.21846 -215.9942 5% -3.581182 -169.6072 10% 4.197633 -128.3316 Obs 3736 25% 23.05633 -115.3 Sum of Wgt. 3736 50% 71.85464 Mean 213.3504 Largest Std. Dev. 569.4535 75% 198.6217 7076.893 90% 477.2984 7166.365 Variance 324277.3 95% 812.351 13452.2 Skewness 11.59034 99% 2155.613 14472.75 Kurtosis 218.2747 HH wlth in 1000s ------------------------------------------------------------- Percentiles Smallest 1% -29.31735 -319 5% -.2 -319 10% .916 -259 Obs 3736 25% 24.35 -259 Sum of Wgt. 3736 50% 80.545 Mean 189.0553 Largest Std. Dev. 443.4924 75% 188.0987 5785 90% 384.7 6202 Variance 196685.5 95% 650 7302.262 Skewness 8.214434 99% 2132.337 8624 Kurtosis 101.6456 . . label var yhat3 "Simulated Wealth" . label var hatota "Wealth" . . twoway (kdensity yhat3 if yhat3<500) (kdensity hatota if hatota<500), ti("Compa > rison of Simulated and Actual Wealth") legend(on order(1 "Simulated Wealth" 2 " > Wealth") parentheses do not balance r(198); end of do-file r(198); . twoway (kdensity yhat3 if yhat3<500) (kdensity hatota if hatota<500), ti("Compa > rison of Simulated and Actual Wealth") legend(on order(1 "Simulated Wealth" 2 " > Wealth")) . graph export simu_wealth.png, as(png) replace (file simu_wealth.png written in PNG format) . . . . . . keep hatota yhat3 . . . . gen id = _n . . . . rename hatota w1 . . rename yhat3 w2 . . reshape long w, i(id) j(source) (note: j = 1 2) Data wide -> long ----------------------------------------------------------------------------- Number of obs. 3736 -> 7472 Number of variables 3 -> 3 j variable (2 values) -> source xij variables: w1 w2 -> w ----------------------------------------------------------------------------- . . . . ksmirnov w, by(source) Two-sample Kolmogorov-Smirnov test for equality of distribution functions Smaller group D P-value Corrected ---------------------------------------------- 1: 0.0388 0.004 2: -0.0393 0.003 Combined K-S: 0.0393 0.006 0.006 Note: ties exist in combined dataset; there are 5512 unique values out of 7472 observations. . . . . log close log: C:\Documents and Settings\agailey\Desktop\hyp_mata\wealth_ahg.log log type: text closed on: 18 Jun 2008, 11:24:02 ---------------------------------------------------------------------------------