Rstan install trouble

Hmm, I’ve never seen this before (RStan working but brms crashing). Sorry for the trouble!

The next test is to get the model and data that brms creates and try running that through rstan.

Can you try the following:

library(brms)
library(rstan)

stancode = make_stancode(formula = time | cens(censored) ~ age * sex + disease 
    + (1 + age|patient), cores = 4,
    data = kidney, family = lognormal(),
    prior = c(set_prior("normal(0,5)", class = "b"),
              set_prior("cauchy(0,2)", class = "sd"),
              set_prior("lkj(2)", class = "cor")))

standata = make_standata(formula = time | cens(censored) ~ age * sex + disease 
    + (1 + age|patient), cores = 4,
    data = kidney, family = lognormal(),
    prior = c(set_prior("normal(0,5)", class = "b"),
              set_prior("cauchy(0,2)", class = "sd"),
              set_prior("lkj(2)", class = "cor")))

mod = stan(model_code=stancode,data=standata)