You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What are your views on something closer to Stan syntax, i.e. passing parameters, data, etc, explicitly?
# `::Tparams` annotation is optional below
StanBlocks.@modelfunctionearn_height_model((;beta, sigma, earn)::Tparams)
beta ~flat(;n=2)
sigma ~flat(;lower=0.)
earn ~normal(beta[1]+beta[2]*to_vector(height), sigma)
end
This has the advantage of clearer semantics but also inherits slicstan's type inference, i.e. types for variables beta, sigma, and earn can be inferred automatically if not specified. It would also enable sharing the (work-in-progress) of interface from Turing.jl to specify Tparams, although specifying Tparams manually is optional for StanBlocks since parameter types can be inferred safely here.
The downside is that users need to provide (;beta, sigma, earn), but that seems fairly reasonable given the clarity on the model's semantics: (1) model parameters are global within the model block, (2) models are functions of input arguments, including parameters and data, etc.
Note that you can keep both @slic and @model, so there is no dilemma here.
Activity