The difference between determination of the formula in transformed parameters and in the model?

Hi guys,

Why sometimes, the equation for the parameters defined in transformed parameter block and sometimes in the model block? What is the difference? Thank you in advance.

Transformed parameters are saved in the sampler output. Anything defined in the model block is not – they’re just temporaries.

Thank you.

Hi everyone,

Does anyone know what is the difference between = and <-?
I am just wondering do we need to define an equation for the parameters in the model block?
I tried to define some equation for my parameters to increase the accuracy of the parameter estimation and another time, I just removed that equation. My answer was not different at all. It seems that it does not consider that defined equation for the parameter at all. Any suggestion? Thank you.

Originally the Stan language used <- following the common convention in R, which goes back to APL via S (the predecessor to R). Then the non-R users pushed back (including many of the Stan developers) and we added = with the intention to eventually deprecate <-. So the short answer is that there is no difference.

Note that you cannot assign values to parameters using either <- or =. Parameters are random and their values will be sampled with MCMC. All you can do is control how they are distributed and hence which values will be sampled.

Also, in the future please create new posts for new questions. Thanks.

Thank you for your help. Sure, I will.