Open bbolker opened 3 years ago
y ~ dnorm(a+x^b, sigma)
but I have two different treatments and I want a1
and a2
to be different parameters for the different treatments.
y ~ dnorm(ifelse(trt=="control", a1, a2) + x^b, sigma)
where trt
is the treatment variable.
The better/more flexible/more legible way to do it:
y ~ dnorm(a+x^b, sigma)
parameters = list(a~trt)
which sets up a linear submodel for a
.
Now I can build in any linear submodel (interactions of treatments, dependence, etc.).
matches the parameters= argument in bbmle