[R] Independent samples bootstrapped T-test : question
Tahereh Dehdarirad
tdehdari at gmail.com
Sat Feb 11 12:55:40 CET 2017
Dear R group,
I have some question regarding bootstrapping in R. I wish to use
independent samples bootstrapped T-test. I would like to know: 1 how I can
calculate p and t values.2. for means and CI of each sample, should I
report the bootstrapped mean and CI of each group? and not the ones
obtained from t-test?
I used the following code with regard to t-test (t value and p value), So,
I wonder if it is correct with regard to t and p values?
AVGMR=Names_first_last$`Avg_ Readars-Mendeley`
B <- 1000
t.star = numeric(B)
t.vect <- vector(length=B)
p.vect <- vector(length=B)
for(i in 1:B){ boot.c <- sample(subset(AVGMR, Gender==1), replace=T)
boot.c <- sample(subset(AVGMR, Gender==2), replace=T)
ttest <- t.test(boot.c, boot.p)
t.vect[i] <- ttest$statistic
p.vect[i] <- ttest$p.value
}
I would be really grateful if you could please help me with regard to my
both questions.
Kind regards,
Tahereh Dehdarirad, PhD
Department of Library and Information Science
University of Barcelona, Spain
[[alternative HTML version deleted]]
More information about the R-help
mailing list