[R] Bootstrapping One- and Two-Sample Hypothesis Tests of Proportion
Marc Schwartz
m@rc_@chw@rtz @ending from me@com
Fri Nov 30 01:07:17 CET 2018
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 <annijanh using gmail.com> 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 <bgunter.4567 using gmail.com> 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 <annijanh using gmail.com> 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 <ruipbarradas using sapo.pt>
>>> 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]]
More information about the R-help
mailing list