Using autoregressive model brms with logit link and beta distribution

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")))

Howdy!

Using init = "0" worked on your reprex for me (although there were a lot of other warnings).
For information on how to define initial values, you might find these links helpful: r - Specify initial values in brms - Stack Overflow.
How to define initial values in stan() in R

Excelent! this worked, so simple. Thank you for the link.

1 Like