Probability density function for log-logistic distribution.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x |
sample position |
||
| real(kind=wp), | intent(in) | :: | alpha |
distribution log-scale |
||
| real(kind=wp), | intent(in) | :: | beta |
distribution shape |
||
| real(kind=wp), | intent(in) | :: | loc |
distribution log-location |
elemental function f_dst_llogistic_pdf_core(x, alpha, beta, loc) result(fx) ! ==== Description !! Probability density function for log-logistic distribution. ! ==== Declarations real(wp), intent(in) :: x !! sample position real(wp), intent(in) :: alpha !! distribution log-scale real(wp), intent(in) :: beta !! distribution shape real(wp), intent(in) :: loc !! distribution log-location real(wp) :: z !! log-scaled variable real(wp) :: t !! transformed variable real(wp) :: fx ! ==== Instructions ! compute transformed variable z = (log(x) - loc) / alpha t = exp(beta * z) ! calculate probability/fx fx = (beta / (alpha * x)) * t / (1.0_wp + t)**2 end function f_dst_llogistic_pdf_core