queezzz / qzmle

Undergrad Thesis - General-Purpose Maximum Likelihood Estimation Package
GNU General Public License v3.0
0 stars 2 forks source link

linear submodels #10

Open bbolker opened 3 years ago

bbolker commented 3 years ago

matches the parameters= argument in bbmle

bbolker commented 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.).