This is just my attempt on running example 1 from RStan Getting Started · stan-dev/rstan Wiki · GitHub.
I save the code into Stan_School.stan
and when I run it with the next 2 line:
schools_dat ← list(J = 8,
y = c(28, 8, -3, 7, -1, 1, 18, 12),
sigma = c(15, 10, 16, 11, 9, 11, 10, 18))
fit ← stan(file = ‘schools.stan’, data = schools_dat)
it gets this error (Only a beginner on Stan so i dont know any workaround)
error in 'model1d6c3f524eb3_Stan_School' at line 3, column 2
-------------------------------------------------
1: data {
2: int<lower=0> J; // number of schools
3: array[J] real y; // estimated treatment effects
^
4: array[J] real<lower=0> sigma; // standard error of effect estimates
-------------------------------------------------
PARSER EXPECTED: <one of the following:
a variable declaration, beginning with type,
(int, real, vector, row_vector, matrix, unit_vector,
simplex, ordered, positive_ordered,
corr_matrix, cov_matrix,
cholesky_corr, cholesky_cov
or '}' to close variable declarations>