Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Parametric bootstrap


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Parametric bootstrap
Date   Sat, 27 Jan 2007 16:30:36 +0000 (GMT)

--- Carlo Lazzaro <[email protected]> wrote:
> is there anyone who can please give me some hint about performing a
> parametric bootstrap using STATA 9/SE? I am quite familiar with
> non-parametric bootstrapping.
 
There is to the best of my or -findit-s knowledge no program that
will do it for you. That's not surprising since there are as many
parametric bootstraps as there are parametric models. A program that is
useful for implementing your routine is -post-, see the example below
in which I perform a paramatric bootstrap assuming that mpg is
lognormally distributed.

*---------- begin example -----------
tempname mean sd memhold
tempfile results

sysuse auto, clear
sum mpg
gen lnmpg = ln(mpg)
sum lnmpg
scalar `mean' = r(mean)
scalar `sd' = r(sd)

postfile `memhold' mean using `results'
forvalues i = 1/1000{
	capture drop sample
	gen sample = exp(`sd'*invnorm(uniform())+`mean')
	sum sample, meanonly
	post `memhold' (r(mean))
}
postclose `memhold'
use `results', clear
sum mean, detail
*-------------- end example --------------

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


	
	
		
___________________________________________________________ 
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index