Closed
Description
I tried to obtain the point-wise likelihood for a model containing a predictor variable:
@model AnovaModel(y, group) = begin
n_groups = length(unique(group))
σ ~ truncated(Cauchy(0, 3), 0, Inf)
α ~ filldist(Normal(0, 10), n_groups)
μ = α[group]
@. y ~ Normal(μ, σ)
end
chain = sample(AnovaModel(y, group), NUTS(), 2000, save_state = true)
but I forgot to include the predictor on the right-hand side:
logprob"y = y | chain = chain"
instead of
logprob"y = y | group = group, chain = chain"
The following error message is not very helpful: ERROR: AssertionError: all(valid_arg, getargnames(modelgen))
.
Maybe the user could be encouraged to add the missing predictors, or could they be conditioned on by default?
Metadata
Metadata
Assignees
Labels
No labels