78  Inference of parameters of microtubule catastrophe

Open in Google Colab | Download notebook

Data set download


In this problem, we use data from Gardner, Zanic, et al., Depolymerizing kinesins Kip3 and MCAK shape cellular microtubule architecture by differential control of catastrophe, Cell, 147, 1092-1103, 2011. The authors investigated the dynamics of microtubule catastrophe, the switching of a microtubule from a growing to a shrinking state. In particular, they were interested in the time between the start of growth of a microtubule and the catastrophe event. They monitored microtubules in a single-molecule TIRF assay by using tubulin (the monomer that comprises a microtubule) that was labeled with a fluorescent marker. As a control to make sure that fluorescent labels and exposure to laser light did not affect the microtubule dynamics, they performed a similar experiment using differential interference contrast (DIC) microscopy. They measured the time until catastrophe with labeled and unlabeled tubulin. We will carefully analyze the data and make some conclusions about the processes underlying microtubule catastrophe.

In the file gardner_mt_catastrophe_only_tubulin.csv (which you can download here), we have observed catastrophe times of microtubules with different concentrations of tubulin. We will consider the experiment run with a tubulin concentration of 12 µM. So, our data set consists of a set of measurements of the amount of time to catastrophe. We will consider four models for microtubule catastrophe.

Note that these descriptions are for the likelihood; we have not specified priors.

a) Describe the first three models as stories. Give physical descriptions of the meanings of their parameters. Describe how these models are related to each other. Recall that we worked out the likelihood for model 4 in a previous exercise. How is it related to the other three models?

b) Build full Bayesian generative models for each of the models. Be sure to perform prior predictive checks. After building the model, perform parameter estimates, and then do posterior predictive checks.

c) Based on the graphical analysis, do you prefer one model versus another? We will be discussing quantitative model comparison in coming weeks to enable to more detailed analysis.

78.1 Solution


# Colab setup ------------------
import os, sys, subprocess
if "google.colab" in sys.modules:
    cmd = "pip install --upgrade iqplot colorcet bebi103 arviz cmdstanpy watermark"
    process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    stdout, stderr = process.communicate()
    import cmdstanpy; cmdstanpy.install_cmdstan()
    data_path = "https://s3.amazonaws.com/bebi103.caltech.edu/data/"
else:
    data_path = "../data/"
# ------------------------------

import numpy as np
import polars as pl

import cmdstanpy
import arviz as az

import bebi103

import iqplot

import bokeh.io
bokeh.io.output_notebook()
Loading BokehJS ...

a)

  • Model 1 says that the microtubule catastrophe times are Exponentially distributed. This means that catastrophe is a Poisson process. I.e., a single Poisson process must arrive to induce catastrophe. In other words, catastrophe is a random, memoryless event. The parameter \(\beta\) is the characteristic rate for arrival of the event that triggers catastrophe.
  • Model 2 says that the microtubule catastrophe times are Gamma distributed. This means that a series of \(\alpha\) Poisson processes must arrive to induce catastrophe. Thus, a series of random, memoryless events must arrive. Importantly, these events have the same rate of occurrence and we can have a non-integer number of events. Perhaps a better model would be to allow for an integer number of events, each with a different rate. Thus, the number of events in this case is an effective number of events, as if all events happened at the same rate. For \(\alpha = 1\), we recover the Exponential distribution.
  • Model 3 accounts for aging. As the parameter \(\alpha\) of the Weibull distribution grows, a microtubule is increasingly more likely to undergo castastrophe as time goes on. In the special case of \(\alpha = 1\), we recover the Exponential model.
  • Model 4 reduces to a Gamma distribution with \(\alpha = 2\) and \(\beta = \beta_1 = \beta_2\) in the limit of \(\beta_1 = \beta_2\). We also recover the Exponential model in the limit where one of the β’s is much bigger than the other. If, arbitrarily \(\beta_2 \gg \beta_1\), then we recover the Exponential model with parameter \(\beta = \beta_1\).

b) We’ll start by loading in the data and taking a look at the ECDF.

# Read in data and take a look
df = pl.read_csv(os.path.join('../data/gardner_mt_catastrophe_only_tubulin.csv'), comment_prefix='#')
df.head()

t = df['12 uM'].drop_nulls().to_numpy() / 60

p = iqplot.ecdf(t, q='time to catastrophe (min)')
bokeh.io.show(p)

We will proceed first with the first three models, the Exponential, Gamma, and Weibull likelihoods. The presence of an inflection point near about two minutes suggests that an Exponential model will not adequately describe the data. Nonetheless, we will try all three models. We should do prior predictive checks first, so let’s code up the models. We will use the same weakly informative priors for all models, with all parameters with the appropriate units.

\[\begin{align} \alpha \sim \text{HalfNorm}(0, 3)\\[1em] \beta \sim \text{HalfNorm}(0, 20). \end{align}\]

We then have the following likelihoods.

\[\begin{align} &\text{Exponential: } t_i \sim \text{Expon}(\beta)\;\forall i,\\[1em] &\text{Gamma: } t_i \sim \text{Gamma}(\alpha, \beta)\;\forall i,\\[1em] &\text{Weibull: } t_i \sim \text{Weibull}(\alpha, 1/\beta)\;\forall i. \end{align}\]

We can do the prior predictive checks using Numpy, including for the two-step model (number 4).

n_ppc = 50
rng = np.random.default_rng(seed=3252)

alpha = np.abs(rng.normal(0, 3, size=n_ppc))
beta = np.abs(rng.normal(0, 20, size=n_ppc))
beta2 = np.abs(rng.normal(0, 20, size=n_ppc))

t_exp_ppc = [rng.exponential(1 / b, size=len(t)) for b in beta]
t_gamma_ppc = [rng.gamma(a, 1 / b, size=len(t)) for a, b in zip(alpha, beta)]
t_weibull_ppc = [rng.weibull(a, size=len(t)) / b for a, b in zip(alpha, beta)]
t_twostep_ppc = [
    rng.exponential(1 / b, size=len(t))
    + rng.exponential(1 / b2, size=len(t))
    for b, b2 in zip(beta, beta2)
]

With our PPC samples drawn, let’s make ECDFs of them.

pl.DataFrame(t_exp_ppc).unpivot()
shape: (34_600, 2)
variable value
str f64
"column_0" 0.704281
"column_0" 0.007533
"column_0" 0.606548
"column_0" 0.992826
"column_0" 0.909112
"column_49" 0.246317
"column_49" 0.510568
"column_49" 1.129408
"column_49" 0.110263
"column_49" 0.193026
plots = [
    iqplot.ecdf(
        pl.DataFrame(data=t_ppc).unpivot(variable_name="trial"),
        q="value",
        cats="trial",
        line_kwargs=dict(line_color="#1f78b4", line_width=0.5),
        show_legend=False,
        title=name,
        x_axis_type="log",
        frame_height=150,
        x_range=[1e-3, 1e3],
    )
    for name, t_ppc in zip(
        ["exp", "gamma", "weibull", "two-step"],
        [t_exp_ppc, t_gamma_ppc, t_weibull_ppc, t_twostep_ppc],
    )
]

# Lock x-axes
for i in range(1, len(plots)):
    plots[i].x_range = plots[0].x_range

bokeh.io.show(bokeh.layouts.gridplot(plots, ncols=1))

The ECDFs cover what we would expect, though the Weibull and Gamma models allow for some extremely long and short times. All models seem to encompass reasonable results based on prior predictive checks.

Now, we’ll code up the Stan models to do the sampling. Here are the respective Stan models, starting with just the first three.

78.1.1 Exponential

data {
  int N;
  array[N] real t;
}


parameters {
  real<lower=0> beta_;
}


model {
  beta_ ~ normal(0, 10);
  
  t ~ exponential(beta_);
}


generated quantities {
  array[N] real t_ppc;

  for (i in 1:N) {
    t_ppc[i] = exponential_rng(beta_);
  }
}

78.1.2 Gamma

data {
  int N;
  array[N] real t;
}


parameters {
  real<lower=0> alpha;
  real<lower=0> beta_;
}


model {
  alpha ~ normal(0, 3);
  beta_ ~ normal(0, 10);
  
  t ~ gamma(alpha, beta_);
}


generated quantities {
  array[N] real t_ppc;

  for (i in 1:N) {
    t_ppc[i] = gamma_rng(alpha, beta_);
  }
}

78.1.3 Weibull

data {
  int N;
  array[N] real t;
}


parameters {
  real<lower=0> alpha;
  real<lower=0> beta_;
}


transformed parameters {
  real sigma = 1.0 / beta_;
}

model {
  alpha ~ normal(0, 3);
  beta_ ~ normal(0, 10);
  
  t ~ weibull(alpha, sigma);
}


generated quantities {
  array[N] real t_ppc;

  for (i in 1:N) {
    t_ppc[i] = weibull_rng(alpha, sigma);
  }
}

We can compile each of these models and obtain our samples.

data = dict(t=t, N=len(t))

samples = {}
for model in ["exp", "gamma", "weibull"]:
    with bebi103.stan.disable_logging():
        sm = cmdstanpy.CmdStanModel(stan_file=f"mt_{model}.stan")
        samples[model] = az.from_cmdstanpy(
            sm.sample(data=data), posterior_predictive="t_ppc"
        )
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                

Though we haven’t covered diagnostics in class yet, it is a good idea to check the diagnostics.

for model, samps in samples.items():
    print(f"\n\n\nDiagnostics for {model}...")
    bebi103.stan.check_all_diagnostics(samps)



Diagnostics for exp...
Effective sample size looks reasonable for all parameters.

Rhat looks reasonable for all parameters.

0 of 4000 (0.0%) iterations ended with a divergence.

0 of 4000 (0.0%) iterations saturated the maximum tree depth of 10.

E-BFMI indicated no pathological behavior.



Diagnostics for gamma...
Effective sample size looks reasonable for all parameters.

Rhat looks reasonable for all parameters.

0 of 4000 (0.0%) iterations ended with a divergence.

0 of 4000 (0.0%) iterations saturated the maximum tree depth of 10.

E-BFMI indicated no pathological behavior.



Diagnostics for weibull...
Effective sample size looks reasonable for all parameters.

Rhat looks reasonable for all parameters.

0 of 4000 (0.0%) iterations ended with a divergence.

0 of 4000 (0.0%) iterations saturated the maximum tree depth of 10.

E-BFMI indicated no pathological behavior.

This all looks good! Samples in hand, we can do posterior predictive checks. We’ll start with the Exponential model.

t_ppc = (
    samples['exp'].posterior_predictive["t_ppc"]
    .stack({"sample": ("chain", "draw")})
    .transpose("sample", "t_ppc_dim_0")
)

bokeh.io.show(
    bebi103.viz.predictive_ecdf(
        t_ppc,
        data=t,
        title="Exponential",
        diff='ecdf',
        x_axis_label='time to catastrophe (min)',
    )
)

The Exponential model clearly fails, terribly. Let’s check Gamma.

t_ppc = (
    samples['gamma'].posterior_predictive["t_ppc"]
    .stack({"sample": ("chain", "draw")})
    .transpose("sample", "t_ppc_dim_0")
)

bokeh.io.show(
    bebi103.viz.predictive_ecdf(
        t_ppc,
        data=t,
        title="Gamma",
        diff='ecdf',
        x_axis_label='time to catastrophe (min)',
    )
)

This looks much better. Just a few, maybe 5%, escape the middle 95 percentile envelope, which is what we would expect. Let’s see if we get any different result with Weibull.

t_ppc = (
    samples['weibull'].posterior_predictive["t_ppc"]
    .stack({"sample": ("chain", "draw")})
    .transpose("sample", "t_ppc_dim_0")
)

bokeh.io.show(
    bebi103.viz.predictive_ecdf(
        t_ppc,
        data=t,
        title="Weibull",
        diff='ecdf',
        x_axis_label='time to catastrophe (min)',
    )
)

The Weibull model performs more poorly in the posterior predictive checks. At this point, we can safely say that the Gamma model is the best of the three, and further that it reasonably captures the data.

This implies that microtubule catastrophe is not the result of a single Poisson process. Microtubules also do not age in the Weibull sense, which is to say that catastrophe-triggering events do not grow more likely with age. Rather, the observations are commensurate with a series of Poisson processes arriving to trigger catastrophe. We can look at the parameter \(\alpha\) to assess how many.

bokeh.io.show(bebi103.viz.corner(samples['gamma']))

So, there are about three Poisson processes that have to arrive in succession to trigger catastrophe. Note that this model assumes that all of the processes arrive at the same rate.

Now, we can finally consider the fourth model. We already preformed prior predictive checks, so we will move on to coding up the posterior.

functions {
  real twostep_lpdf(array[] real ys, vector beta_) {
    // log of the PDF for the two-successive Poisson process model
    real log_pdf;

    // Special case where betas are very close
    if (beta_[2] - beta_[1] < 1e-8) {
      log_pdf = gamma_lpdf(ys | 2, beta_[1]);
    }
    else {
      log_pdf = num_elements(ys) * (log(beta_[1]) + log(beta_[2]) - log(beta_[2] - beta_[1]));
      for (y in ys) {
        log_pdf += log_diff_exp(-beta_[1] * y, -beta_[2] * y);
      }
    }
    
    return log_pdf;
  }
}


data {
  int N;
  array[N] real t;
}


parameters {
  positive_ordered[2] beta_;
}


model {
  beta_ ~ normal(0, 10);
  t ~ twostep(beta_);
}


generated quantities {
  array[N] real t_ppc;

  for (i in 1:N) {
    t_ppc[i] = exponential_rng(beta_[1]) + exponential_rng(beta_[2]);
  }
}

Note that I have defined a function for the two-step model ending in _lpdf. This is a special function name in Stan for functions that return log PDFs that can be used in sampling statements. See the Stan documentation. Note also that I have declared beta_ to be positive_ordered. This is a special data type in Stan that allows specification of \(\beta_1 < \beta_2\). This solves the nonidentifiability issue of label-switching.

Let’s compile and sample out of this model.

with bebi103.stan.disable_logging():
    sm = cmdstanpy.CmdStanModel(stan_file='mt_twostep.stan')
    samples = sm.sample(data=data)

samples = az.from_cmdstanpy(samples, posterior_predictive='t_ppc')
                                                                                                                                                                                                                                                                                                                                

Let’s do a diagnostic check.

bebi103.stan.check_all_diagnostics(samples)
tail-ESS for parameter beta_[0] is 342.55139531472366.
  ESS or tail-ESS below 100 per chain indicates that expectation values
  computed from samples are unlikely to be good approximations of the
  true expectation values.

Rhat looks reasonable for all parameters.

0 of 4000 (0.0%) iterations ended with a divergence.

0 of 4000 (0.0%) iterations saturated the maximum tree depth of 10.

E-BFMI indicated no pathological behavior.
1

Looks good! Now, let’s look at the posterior predictive checks.

t_ppc = (
    samples.posterior_predictive["t_ppc"]
    .stack({"sample": ("chain", "draw")})
    .transpose("sample", "t_ppc_dim_0")
)

bokeh.io.show(
    bebi103.viz.predictive_ecdf(
        t_ppc,
        data=t,
        title="Two-step",
        diff='ecdf',
        x_axis_label='time to catastrophe (min)',
    )
)

The two-step model fails pretty spectacularly; it’s better than Exponential, but not as good as Weibull.

Even though they don’t mean much since we failed the posterior predictive checks, we can look at the parameter values in a corner plot.

bokeh.io.show(bebi103.viz.corner(samples))

78.2 JB doing without marginalizing latent variable

sm = cmdstanpy.CmdStanModel(stan_file='mt_two_step_easy.stan')
15:52:47 - cmdstanpy - INFO - compiling stan file /Users/bois/Dropbox/git/wis-stats/2025/content/content/exercises/inference_with_mcmc_exercises/mt_two_step_easy.stan to exe file /Users/bois/Dropbox/git/wis-stats/2025/content/content/exercises/inference_with_mcmc_exercises/mt_two_step_easy
15:52:51 - cmdstanpy - INFO - compiled model executable: /Users/bois/Dropbox/git/wis-stats/2025/content/content/exercises/inference_with_mcmc_exercises/mt_two_step_easy
samples = sm.sample(data=data)
15:53:01 - cmdstanpy - INFO - CmdStan start processing
15:53:02 - cmdstanpy - ERROR - Chain [1] error: error during processing Operation not permitted
15:53:02 - cmdstanpy - ERROR - Chain [2] error: error during processing Operation not permitted
15:53:02 - cmdstanpy - ERROR - Chain [4] error: error during processing Operation not permitted
15:53:02 - cmdstanpy - ERROR - Chain [3] error: error during processing Operation not permitted
                                                                                                                                                                                                                                                                                                                                
15:53:02 - cmdstanpy - INFO - CmdStan done processing.
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[17], line 1
----> 1 samples = sm.sample(data=data)

File ~/Dropbox/git/huji_stats/.pixi/envs/default/lib/python3.13/site-packages/cmdstanpy/model.py:1136, in CmdStanModel.sample(self, data, chains, parallel_chains, threads_per_chain, seed, chain_ids, inits, iter_warmup, iter_sampling, save_warmup, thin, max_treedepth, metric, step_size, adapt_engaged, adapt_delta, adapt_init_phase, adapt_metric_window, adapt_step_size, fixed_param, output_dir, sig_figs, save_latent_dynamics, save_profile, show_progress, show_console, refresh, time_fmt, timeout, force_one_process_per_chain)
   1131     if not show_console:
   1132         msg += (
   1133             '\nConsider re-running with show_console=True if the'
   1134             ' above output is unclear!'
   1135         )
-> 1136     raise RuntimeError(msg)
   1137 if errors:
   1138     msg = f'Non-fatal error during sampling:\n{errors}'

RuntimeError: Error during sampling:
Exception: exponential_lpdf: Random variable[2] is -0.162878, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.06747, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.89784, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[7] is -1.9041, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.57018, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.72965, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -1.85138, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.0544259, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.727067, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.14364, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -0.905844, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.326619, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.28318, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.813523, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.72656, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.418376, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.40238, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.895031, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.752802, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.651273, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.831908, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -1.33741, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.37677, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.06943, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.94861, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.0260484, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.223389, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.7347, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.93375, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.232136, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.12279, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.979107, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[7] is -0.345915, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.701393, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.62462, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -1.66392, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.649349, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.01115, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.34064, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.80971, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.81046, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.0856857, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.763653, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.32601, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.22937, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.58161, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.36761, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[6] is -0.781436, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.24247, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.167952, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.07263, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.855611, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.26784, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.63917, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.05641, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.25211, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.33404, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.76837, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.72128, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.5629, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.49218, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.947037, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -0.67554, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.799495, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.804168, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.32093, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.17009, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.239562, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.89407, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.428687, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -1.09544, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.938379, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.376109, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.14992, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.148231, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.399479, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.40355, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.29909, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.67783, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.82845, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.37621, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.595281, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.34926, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.04127, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.579007, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.24797, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.540233, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.380018, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.277269, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.95776, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.843682, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -1.16042, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -0.798091, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.87552, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.527759, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.80022, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.80168, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.773555, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.551122, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.70387, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
Exception: exponential_lpdf: Random variable[4] is -1.76277, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.15497, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -0.203145, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.34871, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.12004, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.763551, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.41476, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.95209, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.57321, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.71414, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.702116, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[6] is -0.377669, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.318345, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.46419, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[6] is -1.41113, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.4189, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.351729, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.62775, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.62633, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.635639, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -0.678554, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.0688401, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.466081, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.795805, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.78492, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.96967, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.64385, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.686289, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.61089, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.0231598, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.73994, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.16784, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.305287, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.960571, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -0.644124, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.698228, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[6] is -0.482917, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.412663, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[6] is -0.0994494, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.75006, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.160814, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.54343, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.69982, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.21844, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.28539, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.945216, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.64527, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.990888, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.6821, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.43653, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.21542, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.236554, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.472727, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.0274748, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.87971, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.71875, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.0795799, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.6116, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.716804, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.899634, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.269472, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.415157, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -1.62707, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.74162, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.20934, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.642343, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.161819, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.160215, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.34156, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.65411, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.572174, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[6] is -0.559892, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.794486, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.074101, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.607335, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.90832, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.927896, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.35359, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.47389, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.630489, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.18441, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.0739949, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.52273, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.71624, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.43419, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.966633, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.85785, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.52771, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.83224, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.92561, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.841464, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -1.40772, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.0302, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.00729451, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.50182, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.381555, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.161893, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.303418, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.78465, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.711445, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
Exception: exponential_lpdf: Random variable[3] is -1.45812, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.14149, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.871937, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.6799, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.158444, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.74454, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.46105, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.88166, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.92586, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.60495, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.59575, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.125972, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.34971, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.46834, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.15094, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -0.492669, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.573838, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -1.23805, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.114194, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.934961, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.49977, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.476961, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.06705, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.902501, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -0.976172, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.34896, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.801837, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.35331, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.349873, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.226204, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.49135, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.58878, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.781708, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[6] is -0.713909, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.62566, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.32176, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.374493, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.257216, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.77892, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -0.57516, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -1.53628, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.51942, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.09549, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.847903, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.107958, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.308364, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.35575, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.851293, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.05259, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.333996, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.525377, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -1.48453, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.70646, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.66152, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -0.967995, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.286163, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -1.21801, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[6] is -0.550137, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -1.19839, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.9164, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.143038, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.32555, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.10345, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.833231, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.395307, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.03378, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.970826, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.371086, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.247301, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.6424, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.35354, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.24901, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.62828, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.32555, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.0255851, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.11006, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.0255, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.27118, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.71552, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -1.42297, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.75521, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.311459, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.886378, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.12762, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.720716, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.305507, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.61007, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.966227, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.3331, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.07429, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[9] is -1.88645, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.621879, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.194806, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.37511, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.382228, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.487256, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.07326, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.88822, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.03782, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -1.74873, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
Exception: exponential_lpdf: Random variable[1] is -1.06786, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -0.458061, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.0833678, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -1.52159, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.805064, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.94604, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.526706, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.31845, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.31362, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.99318, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.76869, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.189818, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -1.70451, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.12728, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.892478, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.32476, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.533474, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.2854, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.91014, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.891585, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -1.88158, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[5] is -1.81018, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[8] is -1.48242, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.55225, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.41835, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.0740929, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.655211, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.129479, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.72307, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.801018, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.44381, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.187418, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.24162, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.25048, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.77425, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.28662, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.998769, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.991582, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.260588, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.147813, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.94081, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.69314, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.77058, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.0642229, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.9392, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.102851, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.11838, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.93613, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.3516, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.49156, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.317467, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.398721, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.820781, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.35783, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.56735, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.40467, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.778477, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.974519, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.18028, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.02903, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -0.834807, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -1.31092, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.67387, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.865002, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.145153, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.438074, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.859312, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.172103, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.862818, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.37428, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -0.918173, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -0.684705, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.26732, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -1.80931, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.08433, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.220011, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.718126, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.22557, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[3] is -1.46121, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.75812, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.321363, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.202188, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.0853, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.774539, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.93582, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.82916, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.37218, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -1.07688, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.611952, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.218617, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[4] is -1.56209, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.85792, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.568044, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.40097, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -1.49805, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.130893, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.877276, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.671158, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[2] is -0.0572015, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
    Exception: exponential_lpdf: Random variable[1] is -0.175416, but must be nonnegative! (in 'mt_two_step_easy.stan', line 22, column 2 to column 29)
Command and output files:
RunSet: chains=4, chain_ids=[1, 2, 3, 4], num_processes=4
 cmd (chain 1):
    ['/Users/bois/Dropbox/git/wis-stats/2025/content/content/exercises/inference_with_mcmc_exercises/mt_two_step_easy', 'id=1', 'random', 'seed=96458', 'data', 'file=/var/folders/8h/qwnxpqcx6vldhxr71n1582d00000gn/T/tmpe9970__0/lrvv97av.json', 'output', 'file=/var/folders/8h/qwnxpqcx6vldhxr71n1582d00000gn/T/tmpe9970__0/mt_two_step_easyxwt1ewfe/mt_two_step_easy-20250902155302_1.csv', 'method=sample', 'algorithm=hmc', 'adapt', 'engaged=1']
 retcodes=[1, 1, 1, 1]
 per-chain output files (showing chain 1 only):
 csv_file:
    /var/folders/8h/qwnxpqcx6vldhxr71n1582d00000gn/T/tmpe9970__0/mt_two_step_easyxwt1ewfe/mt_two_step_easy-20250902155302_1.csv
 console_msgs (if any):
    /var/folders/8h/qwnxpqcx6vldhxr71n1582d00000gn/T/tmpe9970__0/mt_two_step_easyxwt1ewfe/mt_two_step_easy-20250902155302_0-stdout.txt
Consider re-running with show_console=True if the above output is unclear!

c) As discussed above, the Gamma model is the only model that passes the graphical posterior predictive checks.

bebi103.stan.clean_cmdstan()

78.3 Computing enviroment

%load_ext watermark
%watermark -v -p numpy,polars,bebi103,cmdstanpy,arviz,bokeh,jupyterlab
print("cmdstan   :", bebi103.stan.cmdstan_version())
Python implementation: CPython
Python version       : 3.13.5
IPython version      : 9.4.0

numpy     : 2.2.6
polars    : 1.31.0
bebi103   : 0.1.28
cmdstanpy : 1.2.5
arviz     : 0.22.0
bokeh     : 3.7.3
jupyterlab: 4.4.5

cmdstan   : 2.36.0