\(l_\beta(\theta) = \dfrac{1}{n \beta} \sum_{i=1}^n f(x_i; \beta)^{\beta} - b_\beta(\theta)\), where \(b_\beta(\theta) = \dfrac{1}{1 + \beta} \int f(x; \theta) ^ {1 + \beta} d x\)
beta_likelihood(x, lambda, mu, sigma, beta = 0.001, rel.tol = 1e-12)
`numeric(n)` - A numeric vector of observations
`numeric` - Vector of mixing proportions of each normal component
`numeric` - Vector of means of each normal component
`numeric` - Vector of standard deviations of each normal component
`numeric(1)` - parameter corresponds to the beta-divergence induced likelihood
relative accuracy requested.
`numeric(1)` - calculated beta-likelihood
set.seed(42)
lambda <- c(0.25, 0.75)
mu <- c(0, 4)
sigma <- c(1, 1)
x <- rnormix(n=100, lambda, mu, sigma)
beta_likelihood(x, lambda, mu, sigma, beta=0.2)
#> [1] 2.845887
#> attr(,"abs.error")
#> [1] 5.085423e-13
beta_likelihood(x, lambda, mu, sigma, beta=1e-3)
#> [1] 997.0638
#> attr(,"abs.error")
#> [1] 4.26254e-13