Compute the maximum loglikelihood function of the PSD model.
Arguments
- G
The I x J matrix of counts; all entries of G should be taken from {0,1,2}.
- result
Output of
psd_fit_em
,psd_fit_sqp
, orpsd_fit_vi
.
Examples
G <- matrix(c(0,0,1, 0,2,1, 1,0,1, 0,1,0, 1,0,0), 3, 5)
result <- psd_fit_em(G, 2, 1e-5, 10)
psd_loglikelihood(G, result)
#> [1] -0.8095321