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)

Arguments

v

vector of mixing weights (conic intrinsic volumes).

data

output of prepare_em(d, m_samp).

mode

specifies whether the first and last values should be taken into account:

mode==0:

take all into account

mode==1:

leave out the estimate of the dth intrinsic volume

mode==2:

leave out the estimate of the 0th intrinsic volume

mode==3:

leave out both estimates of the 0th and dth intrinsic volume

Value

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

See also

prepare_em, estim_statdim_var

Package: conivol

Examples

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.992283
loglike_ivols(v_estim$init0, data)
#> [1] -5.260337
loglike_ivols(v_estim$init1, data)
#> [1] -4.993701
loglike_ivols(v_estim$init2, data)
#> [1] -5.000752
loglike_ivols(v_estim$init3, data)
#> [1] -5.535673
loglike_ivols(v_estim$init4, data)
#> [1] -5.019852