BinomialProdLik¶
- class glimix_core.lik.BinomialProdLik(ntrials, link=None)[source]¶
Product of Binomial likelihoods.
The product can be written as
\[\prod_i \binom{n_i}{n_i y_i} p_i^{n_i y_i} (1-p_i)^{n_i - n_i y_i}\]where \(p_i\) is the probability of success.
- Parameters
ntrials (array_like) – Array of number of trials.
link (link_func) – Link function establishing \(g(p_i) = x_i\). Defaults to
None, which leads to theglimix_core.link.LogitLinklink function.
Methods
__init__(ntrials[, link])Initialize self.
mean(x)Mean of the number of successful trials.
sample(x[, random_state])Sample from the likelihood distribution.
Attributes
nameGet the name of this likelihood.
nsuccessesGet or set an array of successful trials.
ntrialsGet the array of number of trials.
sample_sizeGet the number of samples.