Skip to contents

Helper function that creates stan code for OADA type models.

Usage

generate_STb_model_OADA(
  STb_data,
  model_type = "full",
  transmission_func = "standard",
  veff_params = c(),
  veff_type = "id",
  gq = TRUE,
  priors = list()
)

Arguments

STb_data

a list of formatted data returned from the STbayes_data() function

model_type

string specifying the model type: "asocial" or "full"

transmission_func

string specifying transmission function: "standard", "freqdep_f" or "freqdep_k" for frequency dependent complex contagion. Defaults to "standard".

veff_params

Vector of parameter names (string) for which to estimate varying effects. For the moment, this is mutually exclusive for varying effects on trial or ID, you must choose one or the other using argument veff_type. Default is no varying effects.

veff_type

string specifying whether varying effects should be applied to "ID" or "trial". Default is ID.

gq

Boolean to indicate whether the generated quantities block is added (incl. ll for WAIC)

priors

named list with strings containing the prior for log s or f. defaults to list(log_s = "uniform(-10, 10)", log_f = "normal(0,1)")

Value

A STAN model (character) that is customized to the input data.