I have three binary response, **y1bin** , **y2bin** and **y3bin** and one predictor, **wealthindex** . I have two grouping variables, **years** and **hhid** . I want to fit a mixed multivariate model and also fit an AR1 one model. See my formula specification below

```
`model <- brm(mvbind(y1bin, y2bin, y3bin) ~ 0 + intercept + wealthindex + (0 + 1|g|years) + (0 + 1|p|hhid)
, autocor = list(cor_ar(form = ~years, p = 1, cov = TRUE), cor_ar(form = ~years, p = 1, cov = TRUE), cor_ar(form = ~years, p = 1, cov = TRUE))
, data = df , family = list(bernoulli(link = "logit"), bernoulli(link = "logit"), bernoulli(link = "logit")) , prior = priors )`
```

I tried this but I getting the following error. I will appreciate any help on how to resolve this.

Thanks,

**Duplicate declaration of variable, name=sderr; attempt to redeclare as real in parameter; previously declared as real in parameter**

**error in ‘model5c8a4b5f584c_file5c8a8ab4743’ at line 334, column 21**

**332: vector<lower=-1,upper=1>[Kar_y2bin] ar_y2bin; // autoregressive effects**

**333: vector[N_y2bin] zerr_y2bin; // unscaled residuals**

**334: real<lower=0> sderr; // SD of residuals**

**^**

**335: vector[K_y3bin] b_y3bin; // population-level effects**

**-------------------------------------------------**

- Operating System: ubuntu 18.10
- brms Version: 2.10.0