R/mixing_distribution_penalised_likelihood.R

Defines functions PenalisedLikelihood.default PenalisedLikelihood

Documented in PenalisedLikelihood PenalisedLikelihood.default

#' Calculate the parameters that maximise the penalised likelihood.
#'
#' Used to find suitable starting parameters for nonconjugate mixtures.
#' For some mixing distributions this hasn't been implemented yet.
#'
#' @param mdObj Mixing distribution object
#' @param x Data
#'
#' @export
PenalisedLikelihood <- function(mdObj, x){
  UseMethod("PenalisedLikelihood", mdObj)
}

#' @export
#' @rdname PenalisedLikelihood
PenalisedLikelihood.default <- function(mdObj, x){
  return(PriorDraw(mdObj, 1))
}

Try the dirichletprocess package in your browser

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

dirichletprocess documentation built on Aug. 25, 2023, 5:19 p.m.