[R] bootstrap

Stefano Ghirlanda stefano.ghirlanda at unibo.it
Mon Nov 12 11:12:52 CET 2007


hi,

i am using the boot package for some bootstrap calculations in place
of anovas. one reason is that my dependent variable is distributed
bimodally, but i would also like to learn about bootstrapping in
general (i have ordered books but they have not yet arrived).

i get the general idea of bootstrapping but sometimes i do not know
how to define suitable statistics to test specific hypotheses. two
examples follow.

1) comparing the means of more than two groups. a suitable statistics
   could be the sum of squared deviations of group means from the
   grand mean. does this sound reasonable?

2) testing for interactions. e.g., i want to see whether an
   independent variable has the same effect in two different
   samples. in an anova this would be expressed as the significance,
   or lack thereof, of the interaction between a "sample" factor and
   another factor for the independent variable. how would i do this
   with a bootstrap calculation?

my problem with 2) is that when one fits a linear model to the data,
from which sums of squares for the anova are calculated, the
interaction between the two factors corresponds to many regression
coefficients in the linear model (e.g., i actually have three samples
and an independent variable with four levels). i do not know how to
summarize these in a single statistics.

i have seen somewhere that some people calculate F ratios
nevertheless, but then test them against a bootstrapped distribution
rather than against the F distribution. is this a sensible approach?
could one also use sums of squares directly as the bootstrapped
statistics?

apologies for the longhis mail, and thanks in advance for any insight
into this.

stefano

-- 
Stefano   | Department of Psychology, University of Bologna, and
Ghirlanda | Stockholm University Centre for the Study of Cultural Evolution
            http://www.intercult.su.se/~stefano



More information about the R-help mailing list