[R] boot function

Christina D Smith cdsmith at ksu.edu
Fri Apr 1 19:49:39 CEST 2005


The boot function documentation says, "The data as a vector, matrix or
data frame.  If it is a matrix or data frame then each row is
considered as one multivariate observation".  From trying several
things, I've concluded that this means it resamples the rows but
calculates the statistic on the columns.  For example, if I apply boot
with var as the statistic to a data set with the following column names
Sample, ID, Period, Plot, and Species, I will get the variance for
Sample, ID, Period, Plot, and Species based on the resampled rows.

I have a function that operates on an entire row.  That is, it
calculates a statistic for Species, with in a Sample, ID, Period and
Plot combination.  Is there a way to use such a function as the
statistic in the boot function?

Christina D Smith
PhD Student, GRA
Statistics Department
Kansas State University




More information about the R-help mailing list