Likelihood-ratio test for binomial data.
More...
#include <yat/statistics/LikelihoodRatioTestBinomial.h>
Likelihood-ratio test for binomial data.
This class is useful when having binomial data for several populations and especially comparing the frequency in the differen samples.
◆ LikelihoodRatioTestBinomial()
theplu::yat::statistics::LikelihoodRatioTestBinomial::LikelihoodRatioTestBinomial |
( |
size_t |
n = 2 | ) |
|
constructor
- Parameters
-
n | number of populations in data |
◆ add()
void theplu::yat::statistics::LikelihoodRatioTestBinomial::add |
( |
size_t |
population, |
|
|
bool |
positive, |
|
|
long int |
n = 1 |
|
) |
| |
add one data point
- Parameters
-
population | from which population the data point comes from. |
positive | if true data point is positive. |
n | how many data points added |
◆ llr()
double theplu::yat::statistics::LikelihoodRatioTestBinomial::llr |
( |
void |
| ) |
const |
Calculate natural logarithm of likelihood ratios.
The logairithm of the likelihood ratio is calculated as
◆ n() [1/2]
unsigned long int theplu::yat::statistics::LikelihoodRatioTestBinomial::n |
( |
void |
| ) |
const |
- Returns
- Number of data points
◆ n() [2/2]
unsigned long int theplu::yat::statistics::LikelihoodRatioTestBinomial::n |
( |
size_t |
i | ) |
const |
- Returns
- Number of data points from population i
◆ negative() [1/2]
unsigned long int theplu::yat::statistics::LikelihoodRatioTestBinomial::negative |
( |
void |
| ) |
const |
- Returns
- Number of negative data points
◆ negative() [2/2]
unsigned long int theplu::yat::statistics::LikelihoodRatioTestBinomial::negative |
( |
size_t |
i | ) |
const |
- Returns
- Number of negative data points from population i
◆ positive() [1/2]
unsigned long int theplu::yat::statistics::LikelihoodRatioTestBinomial::positive |
( |
void |
| ) |
const |
- Returns
- Number of data points
◆ positive() [2/2]
unsigned long int theplu::yat::statistics::LikelihoodRatioTestBinomial::positive |
( |
size_t |
i | ) |
const |
- Returns
- Number of positive data points from population i
◆ size()
size_t theplu::yat::statistics::LikelihoodRatioTestBinomial::size |
( |
void |
| ) |
const |
- Returns
- Number of populations
The documentation for this class was generated from the following file: