Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Inserting -e(sample)- when using -bootstrap-


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   st: Inserting -e(sample)- when using -bootstrap-
Date   Fri, 28 Jan 2005 05:35:02 -0000 (GMT)

All,

Hiya! I've tried to run -bootstrap- after the following -corr- run:

. corr conch srconch if (srcycle>.25 & srcycle<.5)
(obs=60)

             |    conch  srconch
-------------+------------------
       conch |   1.0000
     srconch |   0.6417   1.0000

. return list

scalars:
                 r(N) =  60
               r(rho) =  .6417031391377833

. bootstrap `"corr conch srconch if (srcycle>.25 & srcycle<.5)"' _N r = r
  (rho), size(60) reps(1000) saving(bsout) dots replace

command:      corr conch srconch if (srcycle>.25 & srcycle<.5)
statistics:   _bs_1      = _N
              r          = r(rho)

Warning:  Since corr is not an estimation command or does not set e
          (sample), bootstrap has no way to determine which observations
          are used in calculating the statistics and so assumes that all
          observations are used.  This means no observations will be
          excluded from the resampling due to missing values or other
          reasons.

[...]

The -bootstrap- does run, but, as the text says, it runs with _all_
observations (305 in total), and not with the 60 in the original -corr-
run.

Thus is there any way to set up -e(sample)- for -bootstrap- after -corr-
or any estimation command which for whatever reason does not set
-e(sample)-? Thanks.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

*
*   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