teegogl.blogg.se

Stata bootstrap
Stata bootstrap







  1. #Stata bootstrap how to#
  2. #Stata bootstrap code#

It appears that the first approach is the worst one.

  • first sample schools with replacement and then sample students (a) with replacement, or (b) without replacement.
  • If there are similarities within schools then if you sampled pupils at random, not taking into consideration their school membership you could possibly destroy the hierarchical structure of your data.

    stata bootstrap

    We can assume that there are some similarities within schools and differences between schools. Since there is only one class per school, so the second level is nonexistent in your data.

    #Stata bootstrap how to#

    How to do it?įirst, notice that your data is hierarchical, it has several levels: schools, classes within schools, and students within classes. You conducted analysis and now want to use bootstrap to obtain confidence intervals for your estimates. You took a random sample of schools from some area and from each school one class was included in the study. Imagine that you conducted a study about children educational achievements. Local mhr = exp(sqrt(2*e(theta))*invF(`twoinvtheta2',`twoinvtheta2',0.75))īootstrap r(mhr), reps(50) cluster(hospital): est_mhr

    #Stata bootstrap code#

    I have listed the stata code below in case that helps. I am wondering if the answer depends on the parameter of interest, and so would be different if the target was something that was relevant at the patient level rather than the hospital level? resample hospitals, rather than patients? But I don't know if I should cluster the hospitals too (i.e. It seems obvious that I need to cluster the patient observations when re-sampling.

    stata bootstrap

    The data is survival data, and hence there are multiple observations per patient, and multiple patients per hospital. However, now I wish to report the uncertainty associated with this estimate using the bootstrap. I have found the following references which use the Median Hazard Ratio (a bit like the Median Odds Ratio), and calculated this.īengtsson T, Dribe M: Historical Methods 43:15, 2010 The random effect is gamma-distributed, and I am trying to report the 'relevance' of this term on a scale that is easily understood. I have a survival model with patients nested in hospitals that includes a random-effect for the hospitals.









    Stata bootstrap