I want to execute the normal CDF on vector inputs to obtain a vector of cumulative probabilities. However, I am getting a dimension mismatch error. The error says the return on the right-hand side is of type “real”. The Stan documentation says that the cdf function accepts “reals” arguments and has “reals” returns. I thought this psuedotype “reals” included vectors yet it appears to be returning a scalar.
Am I attempting something that is possible or will I need to use a 1:N loop?
vector[N] mu; vector[N] sigma; vector[N] time; vector[N] phi; phi = normal_cdf(time, mu, sigma);
SYNTAX ERROR, MESSAGE(S) FROM PARSER: Dimension mismatch in assignment; variable name = phi, type = vector; right-hand side type = real. Illegal statement beginning with non-void expression parsed as phi