Thanks so much @Bob Carpenter, this is why I love this site. What aspects of the model would you need. How about just the summary output as a start?
Just FYI it is a longitudinal hierarchical model examining the effects of amphetamine use at start of treatment on subsequent amphetamine use in the following year of treatment. outcome
is days of amphetamine in the previous 28 days. This is measured at start of treatment and then at least once (but sometimes more) during treatment. set
is the number of days it is possible to have used amphetamine at each measurement point (always 28). yearsFromStart
is a numeric indicator variable, indicating the time each measurement was taken, in years of treatment, all values between 0 and 1. ats_baseline
is the number of days of amphetamine use in the 28 days prior to starting treatment.
I have been working through the basic approach laid out by Aki Vehtari here and have reposted related recently questions, including here.
Family: zero_inflated_beta_binomial
Links: mu = logit; phi = identity; zi = identity
Formula: outcome | trials(set) ~ ats_baseline * yearsFromStart + ats_baseline * I(yearsFromStart^2) + ats_baseline * I(yearsFromStart^3) + (1 | encID)
Data: workingDF (Number of observations: 2309)
Draws: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
total post-warmup draws = 4000
Multilevel Hyperparameters:
~encID (Number of levels: 695)
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sd(Intercept) 1.68 0.16 1.45 1.98 1.54 7 25
Regression Coefficients:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept -3.76 1.94 -5.20 -0.36 1.59 7 11
ats_baseline 0.13 0.41 -0.62 0.41 1.60 7 11
yearsFromStart 2.39 1.32 0.58 4.65 1.51 7 13
IyearsFromStartE2 -3.07 3.30 -9.14 1.26 1.46 8 18
IyearsFromStartE3 1.75 1.64 -1.62 5.29 1.57 1080 1414
ats_baseline:yearsFromStart -1.16 0.64 -1.86 -0.08 1.59 7 11
ats_baseline:IyearsFromStartE2 2.72 0.68 1.87 4.03 1.44 8 23
ats_baseline:IyearsFromStartE3 -1.27 1.00 -2.61 0.35 1.59 7 11
Further Distributional Parameters:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
phi 3.19 1.02 1.54 4.51 1.58 7 12
zi 0.18 0.19 0.03 0.51 1.56 7 14
Draws were sampled using sample(hmc). For each parameter, Bulk_ESS
and Tail_ESS are effective sample size measures, and Rhat is the potential
scale reduction factor on split chains (at convergence, Rhat = 1).
Warning messages:
1: Parts of the model have not converged (some Rhats are > 1.05). Be careful when analysing the results! We recommend running more iterations and/or setting stronger priors.
2: There were 1000 divergent transitions after warmup. Increasing adapt_delta above 0.8 may help. See http://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup