CAN'T run the "stan()" function

ERROR messages as follows:

fit1<-stan("lm_demo.stan",data=data)
Error in open.connection(con, open = mode) : 
  Timeout was reached: [github.com] Connection timed out after 10010 milliseconds
In addition: Warning message:
In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
  '-E' not found
Error in withr::set_makevars(new, path, state, assignment = assignment) : 
  Multiple results for CXX14FLAGS found, something is wrong.FALSE

Then I tried again, ERROR messages had changed:

fit1<-stan("lm_demo.stan",data=data)
Error in withr::set_makevars(new, path, state, assignment = assignment) : 
  Multiple results for CXX14FLAGS found, something is wrong.FALSE
In addition: Warning message:
In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
  '-E' not found

Which OS are you on?

Windows 10

Can you run the commands in guide here: Configuring C Toolchain for Windows · stan-dev/rstan Wiki · GitHub

1 Like

Thank you! I’ll have a try now.

The problem seems to be resolved, but some error messages still appear:

That error is because rstan is trying to connect to github but your firewall/network settings don’t allow it.

Can you try running:

rstan_options(javascript=FALSE)

Before your stan model?

1 Like

It worked. There is no other problem at the moment. Very appreciated your response.

1 Like