These functions calculate the log-likelihood of an IID sample for specific values of the distribution parameters. See Details.
ll(x, prm, distr, ...)# S4 method for ANY,ANY,character
ll(x, prm, distr, ...)
llbeta(x, shape1, shape2)
# S4 method for numeric,numeric,Beta
ll(x, prm, distr)
llbinom(x, size, prob)
# S4 method for numeric,numeric,Binom
ll(x, prm, distr)
lldirich(x, shape, mar = 2)
# S4 method for matrix,numeric,Dirichlet
ll(x, prm, distr, mar = 2)
llexp(x, rate)
# S4 method for numeric,numeric,Exp
ll(x, prm, distr)
llgamma(x, shape, scale)
# S4 method for numeric,numeric,Gammad
ll(x, prm, distr)
llmgamma(x, shape, scale, mar = 2)
# S4 method for matrix,numeric,MGamma
ll(x, prm, distr, mar = 2)
llnorm(x, mean, sd)
# S4 method for numeric,numeric,Norm
ll(x, prm, distr)
llpois(x, lambda)
# S4 method for numeric,numeric,Pois
ll(x, prm, distr)
Numeric. The value of the log-likelihood function.
numeric. A sample under estimation.
numeric. A vector of the distribution parameters.
A subclass of Distribution
. The distribution family assumed.
extra arguments.
numeric. Distribution parameters.
numeric. In univariate distributions, a matrix can be given
instead of a vector. In this case, the apply function is utilized and mar
is passed to the MARGIN
argument. If each sample is a row, set mar = 1
,
if it is a column, set mar = 2
(the default).
The log-likelihood functions are provided in two forms: the ll<name>
distribution-specific version that follows the base R conventions, and the
S4 generic ll
that complements the distr
package functionalities.