Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

prop_test

Internal function for testing proportion


Description

This function is wrapped by prop.test(), which most users should use instead.

Usage

prop_test(
  x,
  n,
  p = NULL,
  alternative = c("two.sided", "less", "greater"),
  conf.level = 0.95,
  ...
)

Arguments

x

a vector, count, or formula.

n

a vector of counts of trials (not needed when x is a table or matrix).

p

a vector of probabilities of success (for the null hypothesis). The length must be the same as the number of groups specified by x.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter. Only used for testing the null that a single proportion equals a given value, or that two proportions are equal; ignored otherwise.

conf.level

confidence level of the returned confidence interval. Must be a single number between 0 and 1. Only used when testing the null that a single proportion equals a given value, or that two proportions are equal; ignored otherwise.

...

additional arguments passed to methods.


mosaic

Project MOSAIC Statistics and Mathematics Teaching Utilities

v1.8.3
GPL (>= 2)
Authors
Randall Pruim [aut, cre], Daniel T. Kaplan [aut], Nicholas J. Horton [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.