Hi all,
I defined the following model in R to perform a (simple) Bayesian Linear Mixed Model analysis:
library("rstan)
library("brms")
Set priors
priors <- c(prior(normal(200, 1), class = Intercept), # intercept prior
prior(normal(4, 1), class = b), # slope prior
prior(normal(0, 100), class = sigma), # population variance
prior(normal(0, 10), class = sd) # tau0, group variance
)
Fit model
model <- brm(choice ~ 1 + C_growth_mindset + (1|id),
data = data,
prior = priors,
family = gaussian(),
warmup = 1000, # burn-in
iter = 5000, # number of iterations
chains = 2, # number of MCMC chains
control = list(adapt_delta = 0.95)) # advanced MC settings
However when running the model I receive the following error:
Error in compileCode(f, code, language = language, verbose = verbose) :
sh: line 1: c:/rtools40/mingw64/bin/g++: No such file or directorymake: *** [C:/PROGRA~1/R/R-41~1.3/etc/x64/Makeconf:245: file34d0683214e8.o] Error 127
Error in sink(type = "output") : invalid connection
How can I solve this?
Thank you for thinking with me
best,
Smiddy