I think you can use the 'boot' library for this kind of problem.
Suppose
a had a matrix called 'data' which is n x 2 and I want to bootstrap a
statistic (called 'my.statistic') which operates on the entire matrix.
boot.func <- function(x, i) { my.statistic(x[i,]) }
b <- boot(data, boot.func, R = 1000)
The object 'b' contains the bootstrapped values of your statistic
(obtained by resampling rows of the matrix, which in this case is
resampling pairs).
-roger
_______________________________
UCLA Department of Statistics
rpeng at stat.ucla.edu
http://www.stat.ucla.edu/~rpeng
On Tue, 15 Oct 2002, Katalin Csillery wrote:
>
> Hi,
>
> I have a coding problem. I have data pairs, and I want to calculate a
> parameter for the data pairs as a whole data set (so not using the
> information that thely are pairs) I am looking for bias in that certain
> parameter so I want to bootstrap these data pairs(!), and than calculate
> the parameter. I run into a coding problem. How should I define theta in
> order to resample the pairs, but than use the ncol=2 matrix as a whole in
> the bootstrap function.
> Does anybody have an idea for that?
>
> Thanks, Kati
>
>
_____________________________________________________________________________
> Katalin Csillery
>
> Division of Biological Sciences
> University of Montana
> Missoula MT 59801
> Phone: 406 243 6106
> E-mail: csillery at selway.umt.edu
>
_____________________________________________________________________________
>
>
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._