def ppv_converter(sensitivity, specificity, prevalence):
    """Generates the positive predictive value from designated sensitivity, specificity, and prevalence.

    Positive predictive value is calculated using

    .. math::

        PPV = \\frac{Se \\times P}{Se \\times P + (1-Sp) (1-P)}

    Parameters
    -------------
    sensitivity : float
        Sensitivity of the testing criteria
    specificity : float
        Specificity of the testing criteria
    prevalence : float
        Prevalence of the outcome in the population

    Returns
    ------------
    float
        Positive predictive value

    Examples
    --------
    Calculate the positivity predictive value

    >>> from zepid.calc import ppv_converter
    >>> ppv_converter(0.9, 0.88, 0.15)
    """
    if sensitivity > 1 or specificity > 1 or prevalence > 1:
        raise ValueError(
            'sensitivity/specificity/prevalence cannot be greater than 1')
    if sensitivity < 0 or specificity < 0 or prevalence < 0:
        raise ValueError(
            'sensitivity/specificity/prevalence cannot be less than 0')
    sens_prev = sensitivity * prevalence
    nspec_nprev = (1 - specificity) * (1 - prevalence)
    ppv = sens_prev / (sens_prev + nspec_nprev)
    return ppv
