LR.oneProp: Likelihood ratio in one-sample proportion tests
Description
Given a simple null and a simple alternative hypotheses, this function calculates the likelihood ratio (LR) in favor of the alternative based on an observed data in one-sample proportion tests.
Usage
LR.oneProp(m, suff.stat, null = 0.5, alt)
Arguments
m
a postive numeric (integer); number of samples for computing the LR.
suff.stat
a postive numeric (integer); the value of sufficient statistic based on m observed data.
In this case, the sufficient statistic is the total no. of successes out of m observations.
null
a numeric in (0,1); the hypothesized value of proportion under the simple null.
Default: 0.5.
alt
a numeric in (0,1); the hypothesized value of proportion under the simple alternative.
Value
Returns a numeric denoting the LR in favor of alt in the one-sample proportion test based on m observations.