R/one_logliksaturated.R

Defines functions one_logliksaturated

Documented in one_logliksaturated

#' Creates the loglik for the saturated model for one condition
#' \code{one_logliksaturated} creates the  loglik for the saturated model for one condition
#' one_loglik
#' @keywords internal
#' @export
one_logliksaturated <- function(d, x, k, n, psyfunguesslapses, groups, par) {
  nllfun <- create_nllsaturated(d, x, k, n, psyfunguesslapses)
  if (length(groups) == 0) par <- par$par
  else par <- semi_join(par, d, by = groups)$par
  data.frame(loglik = -nllfun(par))
}

Try the quickpsy package in your browser

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

quickpsy documentation built on Oct. 2, 2019, 5:03 p.m.