https://github.com/cran/inferr
Raw File
Tip revision: 59444f93bc0b45cd4ab2cf3493acf201d9fdc5b9 authored by Aravind Hebbali on 28 May 2021, 16:30:02 UTC
version 0.3.1
Tip revision: 59444f9
infer_binom_calc.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ifr-binom-test.R
\name{infer_binom_calc}
\alias{infer_binom_calc}
\alias{infer_binom_test}
\title{Binomial Test}
\usage{
infer_binom_calc(n, success, prob = 0.5, ...)

infer_binom_test(data, variable, prob = 0.5)
}
\arguments{
\item{n}{number of observations}

\item{success}{number of successes}

\item{prob}{assumed probability of success on a trial}

\item{...}{additional arguments passed to or from other methods}

\item{data}{a \code{data.frame} or a \code{tibble}}

\item{variable}{factor; column in \code{data}}
}
\value{
\code{infer_binom_test} returns an object of class \code{"infer_binom_test"}.
An object of class \code{"infer_binom_test"} is a list containing the
following components:

\item{exp_k}{expected number of successes}
\item{exp_p}{expected probability of success}
\item{k}{number of successes}
\item{n}{number of observations}
\item{obs_p}{assumed probability of success}
\item{pval_lower}{lower one sided p value}
\item{pval_upper}{upper one sided p value}
}
\description{
Test whether the proportion of successes on a two-level
categorical dependent variable significantly differs from a hypothesized value.
}
\section{Deprecated Functions}{

\code{binom_calc()} and \code{binom_test()} have been deprecated. Instead use
\code{infer_binom_cal()} and \code{infer_binom_test()}.
}

\examples{
# using calculator
infer_binom_calc(32, 13, prob = 0.5)

# using data set
infer_binom_test(hsb, female, prob = 0.5)
}
\references{
Hoel, P. G. 1984. Introduction to Mathematical Statistics.
5th ed. New York: Wiley.
}
\seealso{
\code{\link[stats]{binom.test}}
}
back to top