R/mtc.model.use.R

Defines functions func.param.matrix.use mtc.model.name.use mtc.model.use

# Unrelated study effects model
mtc.model.use <- function(model) {
  model[['linearModel']] <- 'random'

  model[['data']] <- mtc.model.data(model)
  model[['data']][['nt']] <- NULL
  model[['data']][['t']] <- NULL
  model[['inits']] <- lapply(mtc.init(model), function(inits) {
    inits[-which(names(inits) == "sd.d")]
  })

  model[['code']] <- mtc.model.code(model, c(), '', template='gemtc.model.use.template.txt')

  monitors <- inits.to.monitors(model[['inits']][[1]])
  model[['monitors']] <- list(
    available=monitors,
    enabled=monitors[grep('^delta\\[', monitors)]
  )

    class(model) <- "mtc.model"

  model
}

mtc.model.name.use <- function(model) {
  "unrelated study effects"
}

func.param.matrix.use <- function(model, t1, t2) {
  stop('func.param.matrix.use not implemented')
}

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.