loglike_ivols
evaluates the (normalized) log-likelihood of a vector
with respect to given data, the output of prepare_em
.
loglike_ivols(v, data, mode = 0)
v | vector of mixing weights (conic intrinsic volumes). |
---|---|
data | output of |
mode | specifies whether the first and last values should be taken into account:
|
The output of loglike_ivols
is the value of the normalized
log-likelihood of the mixing weights v
with respect to the
sample data given in data
Package: conivol
D <- c(5,5) alpha <- c(pi/3,pi/4) d <- sum(D) N <- 10^5 v_exact <- circ_ivols( D, alpha, product=TRUE ) # collect sample data m_samp <- rbichibarsq(N,v_exact) data <- prepare_em(d, m_samp) est <- estim_statdim_var(d, m_samp) v_estim <- list( init0 = init_ivols( d ) , init1 = init_ivols( d, 1, delta=est$delta, var=est$var ) , init2 = init_ivols( d, 2, delta=est$delta ) , init3 = init_ivols( d, 3, var=est$var ) , init4 = init_ivols( d, 4, delta=est$delta, var=est$var ) ) # evaluate log-likelihood function loglike_ivols(v_exact, data)#> [1] -4.992283loglike_ivols(v_estim$init0, data)#> [1] -5.260337loglike_ivols(v_estim$init1, data)#> [1] -4.993701loglike_ivols(v_estim$init2, data)#> [1] -5.000752loglike_ivols(v_estim$init3, data)#> [1] -5.535673loglike_ivols(v_estim$init4, data)#> [1] -5.019852