I’m getting the following error when I run my model (below): " Argument ‘autocor’ should be specified within the ‘formula’ argument." I looked this up, but it looks like the autocor argument was replaced with car, and I do have a car argument in the formula. I’m wondering if this is somehow related to the mo(DaysSinceLastExposed) and the prior(dirichlet(), class = “simo”, coef = “moDaysSinceLastExposed1”) aspect of the model because the error is present when I added in these aspects. Any idea what is wrong with the model here? I’m guessing it’s some syntax thing.
Thank you for your help!
# ran w error, Argument ‘autocor’ should be specified within the ‘formula’ argument
fit21<- brm_multiple(formula = chla_mg_m2 ~ temp+PAR_.5+I(PAR_.5^2)+THP+LakeSurfElev_m+mo(DaysSinceLastExposed)+(1+temp+PAR_.5+I(PAR_.5^2)+THP+LakeSurfElev_m+mo(DaysSinceLastExposed)+car(W, gr = site,"icar")|water_year*site),
data = imp, data2 = W_impute,
family = gaussian(),
prior = c(set_prior("normal(0,5)", class = "Intercept"),
set_prior("lognormal(0,1)", class = "sd")),
prior(dirichlet(), class = "simo", coef = "moDaysSinceLastExposed1"),
control = list(adapt_delta = 0.8),
warmup = 1000, iter = 2000, chains = 3,
cores = 3)
version R version 4.0.3 (2020-10-10)
os Windows 10 x64
system x86_64, mingw32: