Skip to contents

Computes the log-likelihood for i.i.d. beta observations. L(a,b|x) = n*(lgamma(a+b) - lgamma(a) - lgamma(b)) + (a-1)*sum(log(x)) + (b-1)*sum(log(1-x))

Usage

loglik_beta(alpha, beta, x)

Arguments

alpha

Shape parameter α (value object), must be positive

beta

Shape parameter β (value object), must be positive

x

Numeric vector of observations in (0,1)

Value

A value object representing the log-likelihood