Hi there, I am relatively new to Bayesian Statistics and decided to use Stan for a current project. The first step is to learn how to model with Stan, for this I intend to translate a working OpenBUGS script (hierarchical model) to Stan and gain comparable results.

Intro

I am an experienced R user but modeling in Stan is quite different. I learned R partly by just trying; writing code and compare the outcome of the code to what I expected the outcome to be.

Problem

When writing a Stan script it seems I can only run a full model and not really observe what my code is doing at intermediate steps.

( Example

I have variable Y in a long format data.frame and I want to use it as a matrix (Y_ij).

R code: matrix(df$Y, nrow = i, ncol = j, byrow=T) # Note in this case: byrow = T (default is F)

Stan: matrix Y[i,j] // does this fill the matrix by row or by column? )

Question

Is there a way to see if the Stan code is actually doing what I think that it is doing? Iād rather learn by trying than endless searching for the mechanics on google / manual / forum.

I understand Stan is (much) like C++, is it a good idea to use some C++ program to see what the (simple) code is doing in Stan? If so; any advice for what to use, maybe something comparable to Rstudio? (I run Ubuntu 16.04)