makeStancode: Write Stan code for a model

Description Usage Arguments Value

Description

Creates a string which represents the full Stan code of the model

Create a string containing the Stan code which describes the specified model

Usage

1
2
3
4
5
6
7
8
9
makeStancode(
  family,
  link,
  effects,
  inconsistency,
  prior.mu.str,
  prior.d.str,
  prior.sigma.str
)

Arguments

family

string indicating family of the distribution of the outcome. Options are: "binomial", "normal", "poisson", ADD?

link

The link function for the nma model. Options are "logit" (binomial family), "cloglog" (binomial family), "log" (poisson family), and "identity" (normal family).

effects

A string indicating the type of treatment effect relative to the baseline, either "fixed" or "random"

inconsistency

Logical indicating if the model is an inconsistency model, if TRUE then an inconsistency model is built, default is FALSE

prior.mu.str

A string of Stan code which defines priors on the baseline treatment effects, or if "default", independent normal priors are used with mean 0 and standard deviation 15u, where u is the largest maximum likelihood estimator in single trials (see van Valkenhoef, G et al. 2012)

prior.d.str

A string of Stan code that defines priors on the relative treatment effects. By default, independent normal priors with mean 0 and standard deciation 15u where u is the largest maximum likelihood estimator in single trials (see van Valkenhoef, G et al. 2012) (BUGSnet)

prior.sigma.str

A string of Stan code that defines the prior on the standard deviation of the relative treatment effects. By default, uniform distribution on (0, u) where u is largest MLE from single trials(see van Valkenhoef, G et al. 2012) (BUGSnet)

Value

A string of Stan code representing the full model


augustinewigle/StanNet documentation built on July 21, 2020, 12:13 a.m.