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 the glimix_core.link.LogitLink link function.

__init__(ntrials, link=None)[source]

Initialize self. See help(type(self)) for accurate signature.

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

name

Get the name of this likelihood.

nsuccesses

Get or set an array of successful trials.

ntrials

Get the array of number of trials.

sample_size

Get the number of samples.