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.
theplu::yat::statistics::LikelihoodRatioTestBinomial::LikelihoodRatioTestBinomial |
( |
size_t |
n = 2 | ) |
|
constructor
- Parameters
-
n | number of populations in data |
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 |
double theplu::yat::statistics::LikelihoodRatioTestBinomial::llr |
( |
void |
| ) |
const |
Calculate natural logarithm of likelihood ratios.
The logairithm of the likelihood ratio is calculated as
unsigned long int theplu::yat::statistics::LikelihoodRatioTestBinomial::n |
( |
void |
| ) |
const |
- Returns
- Number of data points
unsigned long int theplu::yat::statistics::LikelihoodRatioTestBinomial::n |
( |
size_t |
i | ) |
const |
- Returns
- Number of data points from population i
unsigned long int theplu::yat::statistics::LikelihoodRatioTestBinomial::negative |
( |
void |
| ) |
const |
- Returns
- Number of negative data points
unsigned long int theplu::yat::statistics::LikelihoodRatioTestBinomial::negative |
( |
size_t |
i | ) |
const |
- Returns
- Number of negative data points from population i
unsigned long int theplu::yat::statistics::LikelihoodRatioTestBinomial::positive |
( |
void |
| ) |
const |
- Returns
- Number of data points
unsigned long int theplu::yat::statistics::LikelihoodRatioTestBinomial::positive |
( |
size_t |
i | ) |
const |
- Returns
- Number of positive data points from population i
size_t theplu::yat::statistics::LikelihoodRatioTestBinomial::size |
( |
void |
| ) |
const |
- Returns
- Number of populations
The documentation for this class was generated from the following file: