That should be epsilon() --- constants are functions in Stan.
Also, we recommend controlling sigma with a prior rather than hard
constraint if you need to bound it away from zero. Did you run
into instability issues without this?
Also, your generated quantities can vectorize as just this:
lpd <- normal_log(y, mu, sigma);
- Bob
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
stan-users+...@googlegroups.com.
> To post to this group, send email to
stan-...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
> <stan101.R>