[R] Independent samples bootstrapped T-test : question

Bert Gunter bgunter.4567 at gmail.com
Sat Feb 11 16:46:14 CET 2017

```This is really a statistical question and not about R, and purely
statistical questions are typically off topic here. I note that there
is a "boot" package that you may wish to consider, and searching on
"bootstrapping" on rseek.org -- which you should always do before
posting here -- produced what looked like a number of relevant hits.
Otherwise, try posting your question on stats.stackexchange.com, which
*is* concerned with statistical issues.

Cheers,
Bert

Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

On Sat, Feb 11, 2017 at 3:55 AM, Tahereh Dehdarirad <tdehdari at gmail.com> wrote:
> 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?
>
>
> 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
>  }
>
> both questions.
>
> Kind regards,
>
> Department of Library and Information Science
> University of Barcelona, Spain
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help