Hello,
I am new to stan and I was wondering if there was an easy way to visualize intermediate quantity used in a stan model for debugging purposes? Especially, I would like to be able to see the quantity created by the transformed data block (either using Rstan or cmdstanr) ?
data {
int<lower=1> N; // number of observations
vector[N] x;
vector[N] y;
}
transformed data {
// Normalize data
real xmean = mean(x);
real ymean = mean(y);
real xsd = sd(x);
real ysd = sd(y);
real xn[N] = to_array_1d((x - xmean)/xsd);
vector[N] yn = (y - ymean)/ysd;
}
// rest of the model
For example, in this very simple model, I would like to visualize xn, yn.
Thanks for your help,
Edouard