Short summary of the problem
l want to run examples from rethinking package, but ulam funtion is problem when complie model. l have downloaded Rtool42 and cmdstan. but cmdstan is not by running install_cmdstan(). because the speed is unsuccessful
install_cmdstan()
The C++ toolchain required for CmdStan is setup properly!
试开URL’https://api.github.com/repos/stan-dev/cmdstan/releases/latest’
downloaded 14 KB
- Latest CmdStan release is v2.34.1
- Installing CmdStan v2.34.1 in C:\Users\lhj\Documents/.cmdstan/cmdstan-2.34.1
- Downloading cmdstan-2.34.1.tar.gz from GitHub…
试开URL’https://github.com/stan-dev/cmdstan/releases/download/v2.34.1/cmdstan-2.34.1.tar.gz’
试开URL’https://github.com/stan-dev/cmdstan/releases/download/v2.34.1/cmdstan-2.34.1.tar.gz’
试开URL’https://github.com/stan-dev/cmdstan/releases/download/v2.34.1/cmdstan-2.34.1.tar.gz’
试开URL’https://github.com/stan-dev/cmdstan/releases/download/v2.34.1/cmdstan-2.34.1.tar.gz’
so l open the url mannualy to downloaded it.
but have other problems.
code_to_run_your_model(if_applicable)
library(rethinking)
set_cmdstan_path("C:/Users/lhj/Downloads/cmdstan-2.34.1 (1)/cmdstan-2.34.1")
data(rugged)
d <- rugged
d$log_gdp <- log(d$rgdppc_2000)
dd <- d[ complete.cases(d$rgdppc_2000) , ]
dd$log_gdp_std <- dd$log_gdp / mean(dd$log_gdp)
dd$rugged_std <- dd$rugged / max(dd$rugged)
dd$cid <- ifelse( dd$cont_africa==1 , 1 , 2 )
dat_slim <- list(
log_gdp_std = dd$log_gdp_std,
rugged_std = dd$rugged_std,
cid = as.integer( dd$cid )
)
m9.1 <- ulam(
alist(
log_gdp_std ~ dnorm( mu , sigma ) ,
mu <- a[cid] + b[cid]*( rugged_std- 0.215 ) ,
a[cid] ~ dnorm( 1 , 0.1 ) ,
b[cid] ~ dnorm( 0 , 0.3 ) ,
sigma ~ dexp( 1 )
) , data=dat_slim , chains=1 )
Compiling Stan program…
Error in process_initialize(self, private, command, args, stdin, stdout, …
:
! Native call to processx_exec
failed
Caused by error in chain_call(c_processx_exec, command, c(command, args), pty, pty_options, …
:
! Command ‘bin/stanc.exe’ not found @win/processx.c:982 (processx_exec)
l do not know how to solve
If possible, add also code to simulate data or attach a (subset of) the dataset you work with.
Operating System:Windows 11 家庭中文版
Interface Version:R version 4.2.2
Compiler/Toolkit:
thank you so much on advance!