Hi all,
I am trying fit an autoregressive model in brms, but the intialisations fall outside the sample space. However, I have no idea how to manual set the initial draws is someone able to help with this issue?
Thank you in advance.
Reprex:
x <- seq(-50,50,1)
y <- .1*x+sin(x)+rnorm(length(x), 0, 1)
y <- plogis(y)
t <- 1:length(x)
r1 <- sample(c("a", "b", "c"), length(x), T)
r2 <- sample(c("a", "b", "c"), length(x), T)
df <- data.frame(x=x, y=y, r1=r1, r2=r2, t=t)
brm(y~x+(1|r1)+ar(time=t, gr=r2),
data = df,
iter = 1500,
warmup = 500,
family = Beta(link = "logit", link_phi = "log"),
prior = c(prior(normal(0, 0.35), class = "b")))