Processing math: 100%

f_distribution Derived Type

type, public, extends(distribution) :: f_distribution

Defines an F-distribution.


Contents


Components

Type Visibility Attributes Name Initial
real(kind=real64), public :: d1

The measure of degrees of freedom for the first data set.

real(kind=real64), public :: d2

The measure of degrees of freedom for the second data set.


Type-Bound Procedures

procedure, public :: cdf => fd_cdf

  • private pure elemental function fd_cdf(this, x) result(rst)

    Computes the cumulative distribution function.

    The CDF for a F distribution is given as F(x)=Id1x/(d1x+d2)(d12,d22).

    Arguments

    Type IntentOptional Attributes Name
    class(f_distribution), intent(in) :: this

    The f_distribution object.

    real(kind=real64), intent(in) :: x

    The value at which to evaluate the function.

    Return Value real(kind=real64)

    The value of the function.

procedure, public :: defined_range => fd_range

  • private pure function fd_range(this) result(rst)

    Gets the defined range for the distribution.

    Arguments

    Type IntentOptional Attributes Name
    class(f_distribution), intent(in) :: this

    The f_distribution object.

    Return Value real(kind=real64), dimension(2)

    The defined range of the probability distributions [0, infinity). As using a value of infinity may cause issue, this routine returns huge(0.0d0) instead.

procedure, public :: mean => fd_mean

  • private pure function fd_mean(this) result(rst)

    Computes the mean of the distribution.

    Arguments

    Type IntentOptional Attributes Name
    class(f_distribution), intent(in) :: this

    The f_distribution object.

    Return Value real(kind=real64)

    The mean.

procedure, public :: median => fd_median

  • private pure function fd_median(this) result(rst)

    Computes the median of the distribution.

    Arguments

    Type IntentOptional Attributes Name
    class(f_distribution), intent(in) :: this

    The f_distribution object.

    Return Value real(kind=real64)

    The median.

procedure, public :: mode => fd_mode

  • private pure function fd_mode(this) result(rst)

    Computes the mode of the distribution.

    Arguments

    Type IntentOptional Attributes Name
    class(f_distribution), intent(in) :: this

    The f_distribution object.

    Return Value real(kind=real64)

    The mode.

procedure, public :: pdf => fd_pdf

  • private pure elemental function fd_pdf(this, x) result(rst)

    Computes the probability density function.

    The PDF for a F distribution is given as f(x)=(d1x)d1dd22(d1x+d2)d1+d21xβ(d12,d22).

    Arguments

    Type IntentOptional Attributes Name
    class(f_distribution), intent(in) :: this

    The f_distribution object.

    real(kind=real64), intent(in) :: x

    The value at which to evaluate the function.

    Return Value real(kind=real64)

    The value of the function.

procedure, public :: recenter => fd_recenter

  • private subroutine fd_recenter(this, x)

    Recenters the distribution about the supplied value.

    Arguments

    Type IntentOptional Attributes Name
    class(f_distribution), intent(inout) :: this

    The f_distribution object.

    real(kind=real64), intent(in) :: x

    The value about which to recenter.

procedure, public :: standardized_variable => dist_std_var

  • private pure elemental function dist_std_var(this, x) result(rst)

    Computes the standardized variable for the distribution.

    Arguments

    Type IntentOptional Attributes Name
    class(distribution), intent(in) :: this

    The distribution object.

    real(kind=real64), intent(in) :: x

    The value of interest.

    Return Value real(kind=real64)

    The result.

procedure, public :: variance => fd_variance

  • private pure function fd_variance(this) result(rst)

    Computes the variance of the distribution.

    Arguments

    Type IntentOptional Attributes Name
    class(f_distribution), intent(in) :: this

    The f_distribution object.

    Return Value real(kind=real64)

    The variance.