R/fct_weighted_ll.R

Defines functions fct_weighted_ll

Documented in fct_weighted_ll

#' Internal Weighted Log Likelihood Function
#'
#' @param gamma A posterior matrix
#'
#' @keywords internal
#'
#' @return A weighted log likelihood vector
#'
fct_weighted_ll <- function(gamma){

  llik <- apply(gamma, 1, max)
  llik[is.infinite(llik)] <- min(llik[is.finite(llik)])
  sum(llik)

}

Try the mixedLSR package in your browser

Any scripts or data that you put into this service are public.

mixedLSR documentation built on Nov. 10, 2022, 6:17 p.m.