Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

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]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

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

Às 22:33 de 27/11/2018, Janh Anni escreveu:

> 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]]
>
> ______________________________________________
> [hidden email] 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.
>

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

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

On Wed, Nov 28, 2018 at 12:38 PM Rui Barradas <[hidden email]> wrote:

> 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
>
> Às 22:33 de 27/11/2018, Janh Anni escreveu:
> > 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]]
> >
> > ______________________________________________
> > [hidden email] 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.
> >
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

Bert Gunter-2
... 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 )


On Thu, Nov 29, 2018 at 3:30 PM Janh Anni <[hidden email]> wrote:

> 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
>
> On Wed, Nov 28, 2018 at 12:38 PM Rui Barradas <[hidden email]>
> wrote:
>
> > 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
> >
> > Às 22:33 de 27/11/2018, Janh Anni escreveu:
> > > 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]]
> > >
> > > ______________________________________________
> > > [hidden email] 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.
> > >
> >
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] 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.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

Janh Anni
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

On Thu, Nov 29, 2018 at 6:45 PM Bert Gunter <[hidden email]> wrote:

> ... 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 )
>
>
> On Thu, Nov 29, 2018 at 3:30 PM Janh Anni <[hidden email]> wrote:
>
>> 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
>>
>> On Wed, Nov 28, 2018 at 12:38 PM Rui Barradas <[hidden email]>
>> wrote:
>>
>> > 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
>> >
>> > Às 22:33 de 27/11/2018, Janh Anni escreveu:
>> > > 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]]
>> > >
>> > > ______________________________________________
>> > > [hidden email] 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.
>> > >
>> >
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] 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.
>>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

R help mailing list-2
Hi,

I don't see Duncan's reply in the archive, but consider:

> 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

> On Nov 29, 2018, at 6:57 PM, Janh Anni <[hidden email]> wrote:
>
> 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
>
> On Thu, Nov 29, 2018 at 6:45 PM Bert Gunter <[hidden email]> wrote:
>
>> ... 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 )
>>
>>
>> On Thu, Nov 29, 2018 at 3:30 PM Janh Anni <[hidden email]> wrote:
>>
>>> 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
>>>
>>> On Wed, Nov 28, 2018 at 12:38 PM Rui Barradas <[hidden email]>
>>> wrote:
>>>
>>>> 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
>>>>
>>>> Às 22:33 de 27/11/2018, Janh Anni escreveu:
>>>>> 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]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion

Janh Anni
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

On Thu, Nov 29, 2018 at 7:07 PM Marc Schwartz <[hidden email]> wrote:

> Hi,
>
> I don't see Duncan's reply in the archive, but consider:
>
> > 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
>
> On Nov 29, 2018, at 6:57 PM, Janh Anni <[hidden email]> wrote:
>
> 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
>
> On Thu, Nov 29, 2018 at 6:45 PM Bert Gunter <[hidden email]>
> wrote:
>
> ... 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 )
>
>
> On Thu, Nov 29, 2018 at 3:30 PM Janh Anni <[hidden email]> wrote:
>
> 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
>
> On Wed, Nov 28, 2018 at 12:38 PM Rui Barradas <[hidden email]>
> wrote:
>
> 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
>
> Às 22:33 de 27/11/2018, Janh Anni escreveu:
>
> 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]]

______________________________________________
[hidden email] 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.