Rudy,
here is an example based on the help file for -simulate-
-------------------------
capture program drop mcarlols
program define mcarlols, rclass
syntax [, obs(integer 1) ]
drop _all
set obs `obs'
drawnorm eps x
g y=1+x+eps
reg y x
return scalar beta = _b[x]
end
simulate beta=r(beta) , reps(1000): mcarlols, obs(100)
su beta, de
kdensity beta, norm
--------------------------------
le 22/03/2006 20:10, Rudy Fichtenbaum a ecrit :
Stata Users:
I am still learning my way around Stata after many years of using SAS.
In SAS it is fairly easy to write a program to do a simple Monte Carlo
study to illustrate the properties of least squares estimators.
Is there anyone that has a simple example of a Monte Carlo Study for OLS?
Thanks,
Rudy
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/