Discussion:
[R] Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion
Janh Anni
2018-11-27 22:33:11 UTC
Permalink
Hello R Experts!

Does anyone know of a relatively straightforward way to bootstrap
hypothesis tests for proportion in R?

Thanks in advance!

Janh

[[alternative HTML version deleted]]

______________________________________________
R-***@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Rui Barradas
2018-11-28 17:38:18 UTC
Permalink
Hello,

What have you tried?
Reproducible example please.

http://adv-r.had.co.nz/Reproducibility.html
https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
https://www.r-bloggers.com/minimal-reproducible-examples/


Rui Barradas
Post by Janh Anni
Hello R Experts!
Does anyone know of a relatively straightforward way to bootstrap
hypothesis tests for proportion in R?
Thanks in advance!
Janh
[[alternative HTML version deleted]]
______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
______________________________________________
R-***@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Janh Anni
2018-11-29 23:30:27 UTC
Permalink
Hi Rui,

Thanks a lot for responding and I apologize for my late response. I tried
using the *boot.two.per* function in the wBoot package which stated that it
could bootstrap 2-sample tests for both means and proportions but it turned
out that it only works for the mean.

Thanks again,
Janh
Post by Rui Barradas
Hello,
What have you tried?
Reproducible example please.
http://adv-r.had.co.nz/Reproducibility.html
https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
https://www.r-bloggers.com/minimal-reproducible-examples/
Rui Barradas
Post by Janh Anni
Hello R Experts!
Does anyone know of a relatively straightforward way to bootstrap
hypothesis tests for proportion in R?
Thanks in advance!
Janh
[[alternative HTML version deleted]]
______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
Post by Janh Anni
and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]

______________________________________________
R-***@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Bert Gunter
2018-11-29 23:45:24 UTC
Permalink
... but as Duncan pointed out already, I believe, a proportion **is** a
mean -- of 0/1 responses.


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 )
Post by Janh Anni
Hi Rui,
Thanks a lot for responding and I apologize for my late response. I tried
using the *boot.two.per* function in the wBoot package which stated that it
could bootstrap 2-sample tests for both means and proportions but it turned
out that it only works for the mean.
Thanks again,
Janh
Post by Rui Barradas
Hello,
What have you tried?
Reproducible example please.
http://adv-r.had.co.nz/Reproducibility.html
https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
Post by Rui Barradas
https://www.r-bloggers.com/minimal-reproducible-examples/
Rui Barradas
Post by Janh Anni
Hello R Experts!
Does anyone know of a relatively straightforward way to bootstrap
hypothesis tests for proportion in R?
Thanks in advance!
Janh
[[alternative HTML version deleted]]
______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
Post by Janh Anni
and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]

______________________________________________
R-***@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Janh Anni
2018-11-29 23:57:19 UTC
Permalink
Hi Bert,

You mean, just compute the test specifying the mean as the parameter but
using 1's and 0's for the data? Also I don't get how a proportion is a
mean of 0/1 responses. Could you please elaborate? Thanks!

Janh
Post by Bert Gunter
... but as Duncan pointed out already, I believe, a proportion **is** a
mean -- of 0/1 responses.
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 )
Post by Janh Anni
Hi Rui,
Thanks a lot for responding and I apologize for my late response. I tried
using the *boot.two.per* function in the wBoot package which stated that it
could bootstrap 2-sample tests for both means and proportions but it turned
out that it only works for the mean.
Thanks again,
Janh
Post by Rui Barradas
Hello,
What have you tried?
Reproducible example please.
http://adv-r.had.co.nz/Reproducibility.html
https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
Post by Rui Barradas
https://www.r-bloggers.com/minimal-reproducible-examples/
Rui Barradas
Post by Janh Anni
Hello R Experts!
Does anyone know of a relatively straightforward way to bootstrap
hypothesis tests for proportion in R?
Thanks in advance!
Janh
[[alternative HTML version deleted]]
______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
Post by Janh Anni
and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]

______________________________________________
R-***@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Janh Anni
2018-11-30 00:23:37 UTC
Permalink
Hi Marc,

I see what you are saying. I will try re-running the* boot.two.per*
function using 1's and 0's for the data and specifying mean as the
parameter and see what happens. I will report back. Thanks so much for
your kind assistance!

Janh
Hi,
1 / 4
[1] 0.25
mean(c(1, 0, 0, 0))
[1] 0.25
3 / 9
[1] 0.3333333
mean(c(1, 1, 1, 0, 0, 0, 0, 0, 0))
[1] 0.3333333
Regards,
Marc Schwartz
Hi Bert,
You mean, just compute the test specifying the mean as the parameter but
using 1's and 0's for the data? Also I don't get how a proportion is a
mean of 0/1 responses. Could you please elaborate? Thanks!
Janh
... but as Duncan pointed out already, I believe, a proportion **is** a
mean -- of 0/1 responses.
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 )
Hi Rui,
Thanks a lot for responding and I apologize for my late response. I tried
using the *boot.two.per* function in the wBoot package which stated that it
could bootstrap 2-sample tests for both means and proportions but it turned
out that it only works for the mean.
Thanks again,
Janh
Hello,
What have you tried?
Reproducible example please.
http://adv-r.had.co.nz/Reproducibility.html
https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
https://www.r-bloggers.com/minimal-reproducible-examples/
Rui Barradas
Hello R Experts!
Does anyone know of a relatively straightforward way to bootstrap
hypothesis tests for proportion in R?
Thanks in advance!
Janh
[[alternative HTML version deleted]]

______________________________________________
R-***@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Loading...