Description Usage Arguments Value Examples

Conduct 1-sample tests of proportions and tests for equality of k proportions.

1 2 3 4 5 6 | ```
## S3 method for class 'numeric'
prop_test(x, n, p = 0.5, method = c("wald", "wilson",
"agresti-couli", "jeffreys", "modified wilson", "wilsoncc",
"modified jeffreys", "clopper-pearson", "arcsine", "logit", "witting",
"pratt"), alternative = c("two.sided", "less", "greater"),
conf.level = 0.95, correct = FALSE, exact = FALSE, ...)
``` |

`x` |
a vector of counts. |

`n` |
a vector of counts of trials |

`p` |
a probability for the null hypothesis when testing a single proportion; ignored if comparing multiple proportions. |

`method` |
a character string indicating method for calculating confidence interval, default is "wald". Options include, wald, wilson, agresti-couli, jeffreys, modified wilson, wilsoncc modified jeffreys, clopper-pearson, arcsine, logit, witting, and pratt. |

`alternative` |
character string specifying the alternative hypothesis. Possible options are "two.sided" (default), "greater", or "less". |

`conf.level` |
confidence level for confidence interval, default is 0.95. |

`correct` |
a logical indicating whether Yate's continuity correction should be applied. |

`exact` |
a logical indicating whether to output exact p-value, ignored if k-sample test. |

`...` |
further arguments passed to or from other methods. |

a list with class "prop_test" containing the following components:

`x` |
number of successes |

`n` |
number of trials |

`p` |
null proportion |

`statistic` |
the value of Pearson's chi-squared test statistic |

`p_value` |
p-value corresponding to chi-squared test statistic |

`df` |
degrees of freedom |

`method` |
the method used to calculate the confidence interval |

`method_ci` |
confidence interval calculated using specified method |

`exact_ci` |
exact confidence interval |

`exact_p` |
p-value from exact test |

1 2 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.