JuliaBUGS.BUGSPrimitives.dnorm — Function
JuliaBUGS.BUGSPrimitives.dlogis — Function
JuliaBUGS.BUGSPrimitives.dt — Function
dt(μ, τ, ν)If $μ = 0$ and $σ = 1$, the function returns an instance of TDist with $ν$ degrees of freedom, location $μ$, and scale $σ = \frac{1}{\sqrt{τ}}$. Otherwise, it returns an instance of TDistShiftedScaled.
\[p(x|ν,μ,σ) = \frac{Γ((ν+1)/2)}{Γ(ν/2) \sqrt{νπσ}} \left(1+\frac{1}{ν}\left(\frac{x-μ}{σ}\right)^2\right)^{-\frac{ν+1}{2}}\]
sourceJuliaBUGS.BUGSPrimitives.TDistShiftedScaled — Type
TDistShiftedScaled(ν, μ, σ)Student's t-distribution with $ν$ degrees of freedom, location $μ$, and scale $σ$.
This struct allows for a shift (determined by $μ$) and a scale (determined by $σ$) of the standard Student's t-distribution provided by the Distributions.jl package.
Only pdf and logpdf are implemented for this distribution.
See Also
sourceJuliaBUGS.BUGSPrimitives.ddexp — Function
ddexp(μ, τ)Return an instance of Laplace (Double Exponential) with location $μ$ and scale $\frac{1}{\sqrt{τ}}$.
\[p(x|μ,τ) = \frac{\sqrt{τ}}{2} e^{-\sqrt{τ} |x-μ|}\]
sourceJuliaBUGS.BUGSPrimitives.dflat — Function
dflat()Returns an instance of Flat or TruncatedFlat if truncated.
Flat represents a flat (uniform) prior over the real line, which is an improper distribution. And TruncatedFlat represents a truncated version of the Flat distribution.
Only pdf, logpdf, minimum, and maximum are implemented for these Distributions.
When use in a model, the parameters always need to be initialized.
sourceJuliaBUGS.BUGSPrimitives.Flat — Type
FlatThe flat distribution mimicking the behavior of the dflat distribution in the BUGS family of softwares.
JuliaBUGS.BUGSPrimitives.dexp — Function
JuliaBUGS.BUGSPrimitives.dchisqr — Function
dchisqr(k)Returns an instance of Chi-squared with $k$ degrees of freedom.
\[p(x|k) = \frac{1}{2^{k/2} Γ(k/2)} x^{k/2 - 1} e^{-x/2}\]
sourceJuliaBUGS.BUGSPrimitives.dweib — Function
dweib(a, b)Returns an instance of Weibull distribution object with shape parameter $a$ and scale parameter $\frac{1}{b}$.
The Weibull distribution is a common model for event times. The hazard or instantaneous risk of the event is $abx^{a-1}$. For $a < 1$ the hazard decreases with $x$; for $a > 1$ it increases. $a = 1$ results in the exponential distribution with constant hazard.
\[p(x|a,b) = abx^{a-1}e^{-b x^a}\]
sourceJuliaBUGS.BUGSPrimitives.dlnorm — Function
JuliaBUGS.BUGSPrimitives.dgamma — Function
JuliaBUGS.BUGSPrimitives.dpar — Function
JuliaBUGS.BUGSPrimitives.dgev — Function
dgev(μ, σ, η)Returns an instance of GeneralizedExtremeValue with location $μ$, scale $σ$, and shape $η$.
\[p(x|μ,σ,η) = \frac{1}{σ} \left(1 + η \frac{x - μ}{σ}\right)^{-\frac{1}{η} - 1} e^{-\left(1 + η \frac{x - μ}{σ}\right)^{-\frac{1}{η}}}\]
where $\frac{η(x - μ)}{σ} > -1$.
sourceJuliaBUGS.BUGSPrimitives.dgpar — Function
dgpar(μ, σ, η)Returns an instance of GeneralizedPareto with location $μ$, scale $σ$, and shape $η$.
\[p(x|μ,σ,η) = \frac{1}{σ} (1 + η ((x - μ)/σ))^{-1/η - 1}\]
sourceJuliaBUGS.BUGSPrimitives.df — Function
df(n, m, μ=0, τ=1)Returns an instance of F-distribution object with $n$ and $m$ degrees of freedom, location $μ$, and scale $τ$. This function is only valid when $μ = 0$ and $τ = 1$,
\[p(x|n, m, μ, τ) = \frac{\Gamma\left(\frac{n+m}{2}\right)}{\Gamma\left(\frac{n}{2}\right) \Gamma\left(\frac{m}{2}\right)} \left(\frac{n}{m}\right)^{\frac{n}{2}} \sqrt{τ} \left(\sqrt{τ}(x - μ)\right)^{\frac{n}{2}-1} \left(1 + \frac{n \sqrt{τ}(x-μ)}{m}\right)^{-\frac{n+m}{2}}\]
where $\frac{n \sqrt{τ} (x - μ)}{m} > -1$.
sourceJuliaBUGS.BUGSPrimitives.dunif — Function
JuliaBUGS.BUGSPrimitives.dbeta — Function
JuliaBUGS.BUGSPrimitives.dmnorm — Function
dmnorm(μ::AbstractVector, T::AbstractMatrix)Returns an instance of Multivariate Normal with mean vector μ and covariance matrix $T^{-1}$.
\[p(x|μ,T) = (2π)^{-k/2} |T|^{1/2} e^{-1/2 (x-μ)' T (x-μ)}\]
where $k$ is the dimension of x.
JuliaBUGS.BUGSPrimitives.dmt — Function
dmt(μ::AbstractVector, T::AbstractMatrix, k)Returns an instance of Multivariate T with mean vector $μ$, scale matrix $T^{-1}$, and $k$ degrees of freedom.
\[p(x|k,μ,Σ) = \frac{\Gamma((k+d)/2)}{\Gamma(k/2) (k\pi)^{p/2} |Σ|^{1/2}} \left(1 + \frac{1}{k} (x-μ)^T Σ^{-1} (x-μ)\right)^{-\frac{k+p}{2}}\]
where $p$ is the dimension of $x$.
sourceJuliaBUGS.BUGSPrimitives.dwish — Function
JuliaBUGS.BUGSPrimitives.ddirich — Function
JuliaBUGS.BUGSPrimitives.dbern — Function
JuliaBUGS.BUGSPrimitives.dbin — Function
JuliaBUGS.BUGSPrimitives.dcat — Function
JuliaBUGS.BUGSPrimitives.dpois — Function
JuliaBUGS.BUGSPrimitives.dgeom — Function
JuliaBUGS.BUGSPrimitives.dnegbin — Function
dnegbin(p, r)Returns an instance of Negative Binomial with number of failures r and success probability p.
\[P(x|r,p) = \binom{x + r - 1}{x} (1 - p)^x p^r\]
where $x \in \mathbb{Z}^+$.
sourceJuliaBUGS.BUGSPrimitives.dbetabin — Function
dbetabin(a, b, n)Returns an instance of Beta Binomial with number of trials n and shape parameters a and b.
\[P(x|a, b, n) = \frac{\binom{n}{x} \binom{a + b - 1}{a + x - 1}}{\binom{a + b + n - 1}{n}}\]
sourceJuliaBUGS.BUGSPrimitives.dhyper — Function
dhyper(n₁, n₂, m₁, ψ=1)Returns an instance of Hypergeometric. This distribution is used when sampling without replacement from a population consisting of $n₁$ successes and $n₂$ failures, with $m₁$ being the number of trials or the sample size. The function currently only allows for $ψ = 1$.
\[p(x | n₁, n₂, m₁, \psi) = \frac{\binom{n₁}{x} \binom{n₂}{m₁ - x} \psi^x}{\sum_{i=u_0}^{u_1} \binom{n1}{i} \binom{n2}{m₁ - i} \psi^i}\]
where $u_0 = \max(0, m₁-n₂), u_1 = \min(n₁,m₁),$ and $u_0 \leq x \leq u_1$
sourceJuliaBUGS.BUGSPrimitives.dmulti — Function
dmulti(θ::AbstractVector, n)Returns an instance Multinomial with number of trials n and success probabilities θ.
\[P(x|n,θ) = \frac{n!}{∏_{r} x_{r}!} ∏_{r} θ_{r}^{x_{r}}\]
source