Skip to content

Instantly share code, notes, and snippets.

@cdriveraus
Created November 5, 2019 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdriveraus/a4924cb58c88c4ac94dcf737360a4a65 to your computer and use it in GitHub Desktop.
Save cdriveraus/a4924cb58c88c4ac94dcf737360a4a65 to your computer and use it in GitHub Desktop.
install.packages('ctsem')
library(ctsem)
#### 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment