
Runs stan, and plots sampling information while sampling.
stanWplot(object, iter = 2000, chains = 4, ...)
stan model object
Number of iterations
Number of chains
All the other regular arguments to stan()
On windows, requires Rtools installed and able to be found by pkgbuild::rtools_path()
# NOT RUN {
#### example 1
scode <- "
parameters {
real y[2];
}
model {
y[1] ~ normal(0, .5);
y[2] ~ double_exponential(0, 2);
}
"
sm <- stan_model(model_code = scode)
fit1 <- stanWplot(object = sm,iter = 100000,chains=2,cores=1)
# }
Run the code above in your browser using DataLab