prepare_em
takes a two-column matrix whose rows form
iid samples from a bivariate chi-bar-squared distribution and
prepares the data used in maximum likelihood estimation.
prepare_em(d, m_samp)
d | the dimension of the bivariate chi-bar squared distribution. |
---|---|
m_samp | two-column matrix whose rows from iid samples from a bivariate chi-bar-squared distribution. |
The output of prepare_em
is a list of four elements:
n
: the number of overall sample points
(including those in primal or polar cone)
prop_prim
: proportion of points in primal cone
prop_pol
: proportion of points
dens
: the density values of the effective sample points
(neither in primal nor polar cone); that is,
dens
is a (d-1)
row matrix
such that the k
th row contains the products
of the density values of the chi_k^2 and chi_(d-k)^2
distributions evaluated in the effective sample points;
the row-form of the matrix is more convenient for
the computations
rbichibarsq
, circ_rbichibarsq
,
rbichibarsq_polyh
, loglike_ivols
,
estim_em
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 ) m_samp <- rbichibarsq(N,v_exact) str( prepare_em( d, m_samp ) )#> List of 4 #> $ n : int 100000 #> $ prop_prim: num 0.00914 #> $ prop_pol : num 9e-04 #> $ dens : num [1:9, 1:98996] 0.000232 0.001118 0.003193 0.006595 0.010467 ...