R/ll.call.R

Defines functions ll.defined ll.call

Documented in ll.call

ll.call <- function(fnName, model, ...) {
  fn <- paste(fnName, model[['likelihood']], model[['link']], sep=".")
  do.call(fn, list(...))
}

ll.defined <- function(model) {
  fns <- c('mtc.arm.mle', 'mtc.rel.mle', 'mtc.code.likelihood',
    'fitted.values.parameter', 'deviance_fn',
    'scale.log', 'scale.name', 'inits.info',
    'required.columns.ab', 'validate.data',
    'study.baseline.priors')
  fns <- paste(fns, model[['likelihood']], model[['link']], sep=".")
  all(sapply(fns, function(fn) { exists(fn, mode='function') }))
}

Try the gemtc package in your browser

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

gemtc documentation built on July 9, 2023, 5:33 p.m.