prop_test: Internal function for testing proportion

View source: R/prop.test.R

prop_testR Documentation

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 documentation built on May 29, 2024, 5:27 a.m.