Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72776

Post-regression: Augmenting regression function with a random shock

$
0
0
Hi,
i'm trying to use fitted values, predicted standard errors and a random 'shock', drawn from the empirical distribution of residuals of the initial regression to create a Monte Carlo estimate of the future value of my dependent variable (which is change in consumption)

** preparing dependent variable
sort ID year
bysort ID: gen d_exp=(expenditure_deflated[_n]-expenditure_deflated[_n-1])/expenditure_deflated[_n-1] if year==year[_n-1]+1

**regression with weights
bootstrap, reps(1000): reg d_exp dependency education grants female hh_age rural white african wx_hhsizer [pw=wx_wgt], ro
predict exp_u2, stdp
predict fitted, xb
estimates store reg3

Now here's the part that i don't know.
It's supposed to look like this: NEW_VAR=FITTED VALUES+RANDOM DRAW FROM RESIDUALS OF REGRESSION.
The tricky part is the random draw. It's easy to use a uniform distribution, for example, and draw one number from it, but drawing one data point for each observation from existing data (a random 'shock'?! Any ideas? Thank you!


Viewing all articles
Browse latest Browse all 72776

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>