f_dst_llogistic_pdf_core Function

public elemental function f_dst_llogistic_pdf_core(x, alpha, beta, loc) result(fx)

Probability density function for log-logistic distribution.

Arguments

Type IntentOptional 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

Return Value real(kind=wp)


Called by

proc~~f_dst_llogistic_pdf_core~~CalledByGraph proc~f_dst_llogistic_pdf_core f_dst_llogistic_pdf_core proc~f_dst_llogistic_pdf f_dst_llogistic_pdf proc~f_dst_llogistic_pdf->proc~f_dst_llogistic_pdf_core interface~fsml_llogistic_pdf fsml_llogistic_pdf interface~fsml_llogistic_pdf->proc~f_dst_llogistic_pdf

Source Code

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