[R] implement a jackknife resampling test with size of each jackknife replicate controlled
Mao Jianfeng
jianfeng.mao at gmail.com
Tue Jul 20 08:49:45 CEST 2010
Dear R-help listes,
I need your helps on implementation a jackknife resampling test.
For example, I have a sample of 100 observations. I need to calculate
the mean by jackknife resampling test. I just intend to sample 75% of
the whole sample (say 75 in this case) in each 100 times of jackknife
replicate to calculate the mean.
Following are my codes
==============================================================
# firstly, I used the "jackknife" function in package "bootstrap"
x <- rnorm(100) # my whole sample data
library(bootstrap)
theta <- function(x){mean(x)} # define the argument "theta" used in jackknife()
results <- jackknife(x,theta) # I got the results but I do not know
how many samples it resampled in each jackknife replicate.
=============================================================
# secondly, I want to build up a jackknife method with which can
control the resampling size of each jackknife replicate.
x <- rnorm(100) # my whole sample data
Could you please give any helps on that? Your helps are very valuable for me.
Best regards,
Sincerely,
Mao Jian-Feng
More information about the R-help
mailing list