library(rstan)
## Loading required package: Rcpp
## Loading required package: inline
## 
## Attaching package: 'inline'
## 
## The following object is masked from 'package:Rcpp':
## 
##     registerPlugin
## 
## rstan (Version 2.4.0, packaged: 2014-07-21 17:16:17 UTC, GitRev: c995bc8b9d67)
Difficulty <- 3

stancode='
parameters{
  real<lower=-5,upper=5> a;
}
model{
  real b;
  b <- 2;
  increment_log_prob(-a*a*(a-b)*(a-b)*(a+b)*(a+b));
}
'
fit <- stan(model_code=stancode,chains=10 - Difficulty)
traceplot(fit)

plot of chunk unnamed-chunk-1

ゴオオオオオオオオオオオル!!!!!

進捗だめです.