Skip to content

Instantly share code, notes, and snippets.

@bakaburg1
Created July 18, 2019 17:36
Show Gist options
  • Save bakaburg1/e89bbc366bf998670c8c93217e175ada to your computer and use it in GitHub Desktop.
Save bakaburg1/e89bbc366bf998670c8c93217e175ada to your computer and use it in GitHub Desktop.
Error producing brm code
brms.mod.attesa.prior <- brm(bf(Attesa ~ log(N.prest) + (log(N.prest)|Context), shape ~ log(N.prest) + (log(N.prest)|Context), family = Gamma('log')), data = TdA, prior = c(
set_prior('normal(0, 2.5)', class = 'Intercept'),
set_prior("cauchy(0, 2.5)", class = 'b'),
set_prior("normal(0, 1.5)", class = 'sd', group = 'Context'),
set_prior("normal(0, 1.5)", class = 'sd'),
set_prior("student_t(3, 0, 2.5)", class = 'sd', dpar = 'shape'),
set_prior("student_t(3, 0, 2.5)", class = 'sd', group = 'Context', dpar = 'shape')
), init_r = 0.1, cores = 8, chains = 8, iter = 8000, warmup = 2000, control = list(max_treedepth = 15, adapt_delta = .90))
Error in stan_base_prior(prior) : length(base_prior) == 1L is not TRUE
In addition: Warning message:
Rows containing NAs were excluded from the model.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment