check.likelink: Check likelihood and link function

Description Usage Arguments

View source: R/run.functions.R

Description

Checks that likelihood and link function is provided and confirm that the correct form of data is provided.

Usage

1
check.likelink(data.ab, likelihood = NULL, link = NULL)

Arguments

data.ab

A data frame of arm-level data in "long" format containing the columns:

  • studyID Study identifiers

  • dose Numeric data indicating the dose (must take positive values)

  • agent Agent identifiers (can be numeric, factor or character)

  • y Numeric data indicating the aggregate response for a continuous outcome. Required for continuous data.

  • se Numeric data indicating the standard error for a given observation. Required for continuous data.

  • r Numeric data indicating the number of responders within a study arm. Required for binomial or poisson data.

  • N Numeric data indicating the total number of participants within a study arm. Required for binomial data

  • E Numeric data indicating the total exposure time for participants within a study arm. Required for poisson data.

  • class An optional column indicating a particular class code. Agents with the same identifier must also have the same class code.

likelihood

A string indicating the likelihood to use in the model. Can take either "binomial", "normal" or "poisson". If left as NULL the likelihood will be inferred from the data.

link

A string indicating the link function to use in the model. Can take any link function defined within JAGS (e.g. "logit", "log", "probit", "cloglog") or be assigned the value "identity" for and identity link function. If left as NULL the link function will be automatically assigned based on the likelihood.


MBNMAdose documentation built on Sept. 13, 2020, 5:08 p.m.