You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Complete documentation of verification of rstan using the RStan example.
Description:
For new stan users like myself, the below could use clarification:
In the section Verifying Installation, there is missing text after "You may also see the warning:"
"To verify your installation, you can run the RStan example/test model:
example(stan_model, package = "rstan", run.dontrun = TRUE)
The model should then compile and sample. You may also see the warning:"
The error message I get is:
Compilation ERROR, function(s)/method(s) not created!
Error in compileCode(f, code, language = language, verbose = verbose) :
Error in system(paste(MAKE, p1(paste("-f", shQuote(makefiles))), "compilers"), : 'make' not foundCalls: -> .shlib_internal -> systemExecution halted
I'm unclear if this is the expected error or already indicates a different issue in the installation that I need to address.
The full set of error messages I get after running library("rstan"):
[Addressed in Getting Started]
For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores()).
[Addressed in Getting Started]
To avoid recompilation of unchanged Stan programs, we recommend calling
rstan_options(auto_write = TRUE)
[Can you address this in the documentation?]
For within-chain threading using reduce_sum() or map_rect() Stan functions,
change threads_per_chain option:
rstan_options(threads_per_chain = 1)
[Unique to Windows, but not clear how to check "if your Makevars.win file does not contain this flag"]
Do not specify '-march=native' in 'LOCAL_CPPFLAGS' or a Makevars file
Under Example 1, File -> New File -> Stan File generates a simple stan model with a header (below). It would be helpful to mention whether this should be kept or not when copying over the specified code for schools.stan and make clear
that schools_dat.. and fit... go in the console or a separate .R file.
//
// This Stan program defines a simple model, with a
// vector of values 'y' modeled as normally distributed
// with mean 'mu' and standard deviation 'sigma'.
//
// Learn more about model development with Stan at:
//
// http://mc-stan.org/users/interfaces/rstan.html
// https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started
//
// The input data is a vector 'y' of length 'N'.
data {
int<lower=0> N;
vector[N] y;
}
// The parameters accepted by the model. Our model
// accepts two parameters 'mu' and 'sigma'.
parameters {
real mu;
real<lower=0> sigma;
}
// The model to be estimated. We model the output
// 'y' to be normally distributed with mean 'mu'
// and standard deviation 'sigma'.
model {
y ~ normal(mu, sigma);
}
RStan Version:
2.32.6
R Version:
"R version 4.4.1 (2024-06-14 ucrt)"
Operating System:
Windows 10Pro v.22H2
The text was updated successfully, but these errors were encountered:
Summary
Complete documentation of verification of rstan using the RStan example.
Description:
For new stan users like myself, the below could use clarification:
"To verify your installation, you can run the RStan example/test model:
example(stan_model, package = "rstan", run.dontrun = TRUE)
The model should then compile and sample. You may also see the warning:"
The error message I get is:
Compilation ERROR, function(s)/method(s) not created!
Error in compileCode(f, code, language = language, verbose = verbose) :
Error in system(paste(MAKE, p1(paste("-f", shQuote(makefiles))), "compilers"), : 'make' not foundCalls: -> .shlib_internal -> systemExecution halted
I'm unclear if this is the expected error or already indicates a different issue in the installation that I need to address.
[Addressed in Getting Started]
For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores()).
[Addressed in Getting Started]
To avoid recompilation of unchanged Stan programs, we recommend calling
rstan_options(auto_write = TRUE)
[Can you address this in the documentation?]
For within-chain threading using
reduce_sum()
ormap_rect()
Stan functions,change
threads_per_chain
option:rstan_options(threads_per_chain = 1)
[Unique to Windows, but not clear how to check "if your Makevars.win file does not contain this flag"]
Do not specify '-march=native' in 'LOCAL_CPPFLAGS' or a Makevars file
that schools_dat.. and fit... go in the console or a separate .R file.
//
// This Stan program defines a simple model, with a
// vector of values 'y' modeled as normally distributed
// with mean 'mu' and standard deviation 'sigma'.
//
// Learn more about model development with Stan at:
//
// http://mc-stan.org/users/interfaces/rstan.html
// https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started
//
// The input data is a vector 'y' of length 'N'.
data {
int<lower=0> N;
vector[N] y;
}
// The parameters accepted by the model. Our model
// accepts two parameters 'mu' and 'sigma'.
parameters {
real mu;
real<lower=0> sigma;
}
// The model to be estimated. We model the output
// 'y' to be normally distributed with mean 'mu'
// and standard deviation 'sigma'.
model {
y ~ normal(mu, sigma);
}
RStan Version:
2.32.6
R Version:
"R version 4.4.1 (2024-06-14 ucrt)"
Operating System:
Windows 10Pro v.22H2
The text was updated successfully, but these errors were encountered: