Skip to content

log-t distributed heterogenity prior implementation #80

@rheuer83

Description

@rheuer83

I'd like to use an empirical heterogeneity prior for SMD data based on a publication by Rhodes et al, which specifies a log-t distribution with 5 degrees of freedom for my outcome of interest (see https://doi.org/10.1016/j.jclinepi.2014.08.012). Currently, the log-t distribution is not implemented in GEMTC although it is available in JAGS.

In the JAGS code contained in a model object with the default mtc.hy.prior settings, I've selectively grabbed the prior specification line and replaced it with the specifications from the publication (extracted from the bayesmeta package). I am also changing the initialized and monitored variables in the model object to contain log.sd.d. My code runs and produces a plausible forest plot and convergence metrics.

Could you give me your assessment whether my approach is valid in the context of how GEMTC processes the data or whether there is better way to implement a log-t distribution?

Thank you so much!

Here is the relevant code snippet (I've not included changing the inits and monitored variables for brevity):

rhodes_bayesmeta <- bayesmeta::RhodesEtAlPrior(
  "signs / symptoms reflecting continuation / end of condition and infection / onset of new acute / chronic disease",
  "pharmacological",
  "placebo / control"
)

meanlog <- rhodes_bayesmeta$parameters[2, 1]
precision_t <- 1 / rhodes_bayesmeta$parameters[2, 2]^2
df <- 5

model_gemtc <- mtc.model(
  net_gemtc,
  likelihood = "normal",
  link = "smd",
  linearModel = MOD,
)

pattern <- "sd\\.d\\s*~\\s*dunif\\(0,\\s*om\\.scale\\)\n\ttau\\.d <- pow\\(sd\\.d, -2\\)"
replacement <- paste0(
  "log.sd.d ~ dt(",
  meanlog,
  ", ",
  precision_t,
  ", ",
  df,
  ")\n",
  "\tsd.d <- exp(log.sd.d)\n",
  "\ttau.d <- pow(sd.d, -2)"
)

model_gemtc$code <- str_replace(
  model_gemtc$code,
  pattern = pattern,
  replacement = replacement
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions