epinowcast
|
Go to the source code of this file.
Functions | |
real | zero_truncated_normal_lpdf (vector y, real mu, real sigma) |
real zero_truncated_normal_lpdf | ( | vector | y, |
real | mu, | ||
real | sigma | ||
) |
Compute log PDF for a zero-truncated normal distribution
Calculates the log probability density for a vector of observations assumed to follow a zero-truncated normal distribution with specified mean and standard deviation. This function is useful in contexts where the normal distribution is truncated to exclude values below zero.
y | Vector of observations. |
mu | Mean of the zero-truncated normal distribution. |
sigma | Standard deviation of the zero-truncated normal distribution. |
y
given mu
and sigma
.g * normal_lccdf(0 | mu, sigma)
adjusts for the probability mass excluded by truncation, where g
is the number of elements in y
.effect_priors_lp
for applying a zero-truncated normal prior to the standard deviations of random effects in a regression context. Definition at line 29 of file zero_truncated_normal.stan.