|
"Richard Willey" <rwilley@mathworks.com> wrote in message <hbkvf4$c91$1@fred.mathworks.com>...
> > Are you familiar with bootstrapping?? I have a question.....
> >
> > I am bootstrapping the correlation coefficient, rhoboot, between 2 vectors
> > of size n x 1 and also an estimation of its variance,varboot, (im not
> > using the sample variance).
> >
> > Given that I could not bootstrap both statistics at once, I did it
> > separatelly. If I compare the results from bootstrapping both statistics
> > at once with the results obtataind with separate bootstraping procedure,
> > they differ in some sence.
> >
> > Even thoug the bootstraped statistics have the same quantiles and mean
> > under both schemes, plotting rhoboot vs varboot is different. When I do
> > the plot for the bootstrap procedure including both statistic at once, it
> > is a clear dependence between the correlation and its variance. But, when
> > I bootstrap the statistic separately and I do the plot, the dependece is
> > not present in the graph.
> >
> > Any idea what is going on??
>
> Hi Rogelio
>
> Without seeing your code, its hard to know exactly whats happening, however,
> I'm willing to make a guess:
>
> Any time you're performing a bootstrap, you're drawing random samples with
> replacement. This process is intrinsically random, so its natural to expect
> small amounts of variance from one bootstrap to another. In this case,
> however, it doesn't sound like you're dealing with a little imprecision;
> rather, your results are changing dramatically. This in turn suggests the
> following:
>
> When you're bootstrapping your two statistics separately, you're drawing
> your samples in a different order.
> Its entirely possible that this discrepancy in the ordering is eliminating
> the correlation between the two data series.
>
> There are a few different ways that you can control for this. You can play
> games with the seed of the random number generator. Alternatively, you can
> create an index and use this to preserve the sampling order across
> variables. (I'm sure folks can suggest any number of better solutions)
>
> I will make one (general) suggestion.
>
> Conceptually, bootstraps are quite simple. However, there are a lot of
> different ways that you can shoot yourself in the foot. I often find that
> the easiest way to avoid trouble is to make things as simple as possible.
> Start out by implementing your own bootstrap using the randsample option
> (also contained inside Statistics Toolbox). Once you've done this a few
> times and have a really good understanding how you're applying this
> technique THEN move over to functions like bootstrp and bootci...
>
> regards,
>
> Richard
Thanks Richard,
I beleive that the discrepancy, as you mentioned, is done because I was resampling twice, so the variance estimand uses a different set of bootstrap variables than the correlation estimand. However, I didnt know that the result will be so different. I will try to work out the math for simpler statistics and see whats going on. By the way, I was trying to set the seed of the random generator but got lost with all different options! Do you know how to set the seed for the bootstrp function??
Rogelio
|