Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Extract Values from bootstrap operation

From   Nick Cox <>
Subject   Re: st: Extract Values from bootstrap operation
Date   Wed, 19 Dec 2012 18:44:28 +0000

The -saving()- option of -bootstrap- is used for this purpose. It
wouldn't make much sense to generate variables, in the current dataset
as the results couldn't be aligned logically with the current
observations and in general the number of samples need not be the same
as the number of observations.


On Wed, Dec 19, 2012 at 6:36 PM, Rahber Thariani <> wrote:

> I'm a noob at Stata and running into an issue extracting values from a
> bootstrap operation. I'm running Stata 12.
> I have
> drawnorm y1 y0, n(500) means(m) sds(sd) corr(corr)  cstorage(lower)
> gen d = (uniform() >0.5)
>  gen y = d*y1 + (1-d)*y0
> gen y0_hold=y if d==0
> noi bootstrap y0_bs=r(mean): sum y0_hold
> gen y1_hold=y if d==1
> noi  bootstrap y1_bs=r(mean): sum y1_hold
> I can see the results of the bootstrap on screen but don't know how to
> access them, and assign to a variable and then save to a file.
> So
> 1) How do I assign the different values on screen to different variables,
> like the co-efficient, 95% interval etc?
> 2) How do I save the variables to a specific file.
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index