Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Insufficient observations to compute bootstrap standard errors


    Hello everyone, I am new on STATA, if anyone can help me, I would be very grateful.

    I'm working with a health survey database. I need to determine the difference between the means of the variable "imc" (body mass index) of two different periods, year 2003 survey versus 2009 survey.

    My database contains the variables age, sex, imc (body mass index), ano_encuesta (Survey date, 2003 or 2009), and IMC_dec(1 - 10). This last variable was generated to determine to which decile of the distribution belongs the value of the varible "bmi".

    The variable "fexp" contains the weights corresponding to each observation.


    The code I am using is as follows

    . svyset _n [pweight=fexp], vce(bootstrap) bsrweight(imc fexp)

    pweight: fexp
    VCE: bootstrap
    MSE: off
    bsrweight: imc fexp
    Single unit: missing
    Strata 1: <one>
    SU 1: <observations>
    FPC 1: <zero>

    .
    .
    .
    . . keep if IMCdec==10
    (7,895 observations deleted)

    .
    .
    .
    . . svy: mean imc, subpop(if edad>=15 & edad<45) over(ano_encuesta)
    (running mean on estimation sample)

    Bootstrap replications (2)
    ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
    xx
    insufficient observations to compute bootstrap standard errors
    no results will be saved
    r(2000);

    .
    .
    .
    . . estat size, obs size
    last estimates not found
    r(301);

    .
    .
    .
    . . lincom [imc]2009 - [imc]2003
    last estimates not found
    r(301);



    ------------O----------------

    In this particular analysis I keep just 1,017 observtions. Is this number not enough to perform a boostrap analysis of the standard error? I would be very glad if someone can say me what can I do with my code.

    Meaby if I increase the number of replications of the bootstrap could work, but I don´t know how to do it.


    Raúl Gallegos. From Chile.
    Last edited by Raul Gallegos; 05 Sep 2017, 13:30.

  • #2
    1,017 observations has nothing to do with it. Look closely:

    Code:
    . . svy: mean imc, subpop(if edad>=15 & edad<45) over(ano_encuesta)
    (running mean on estimation sample)
    
    Bootstrap replications (2)
    ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
    xx
    insufficient observations to compute bootstrap standard errors
    no results will be saved
    r(2000);
    Notice those two little x's above the line beginning "insufficient observations." Stata attempted two bootstraps (apparently you have two sets of bootstrap resampling weights in your data). The x's mean that both of those attempts to estimate the mean failed. It doesn't tell you why those estimates failed, but it is the absence of any calculated means that makes it impossible to calculate the bootstrap standard errors: there are no means to calculate standard errors of!

    So you need to investigate why Stata could not compute any means. The obvious possibilities are:

    The first thing I would do, though, is fix your incorrect -svyset- statement. The variable imc does not belong in the -bsrweight()- option. It is not a bootstrap resampling weight. After you remove that, you are left with just a single bootstrap resamplinb weight, fexp, which doesn't really make sense. A one-sample bootstrap rather misses the point (and may not even be syntactically legal--I don't know.) I think you need to go back and carefully review the documentation that came with your survey data to identify the correct variables to use as bootstrap resampling weights. Usually there is a series of them, usually named with a common prefix followed by numbers. And usually there are many of them.

    You need to do that, regardless of your current problem. It may be that it solves this problem--that wouldn't surprise me, though I don't promise it.

    If you still encounter this issue after you fix that, then I suggest you post back with some example data. Do use the -dataex- command for that. (And, in the future, please post your commands and Stata output between code delimiters.) Please read FAQ #12 for instructions on how to post data examples, Stata code, and Stata output in the most helpful way, to maximize your chances of getting timely and useful responses.

    Comment


    • #3

      Many thanks clyde, I'll try to follow your set and then tell you how I find it. Thank you very much for your prompt reply.

      Comment

      Working...
      X