U
    Kvf
                     @   s.   d Z ddlZddlmZ d	ddZdd ZdS )
zK
Created on Mar 30, 2022 1:21:54 PM

Author: Josef Perktold
License: BSD-3
    N)assert_allclosediffc                 C   s.  |dkrp| | }t | |d  d ||d  d  }t | |d  d ||d  d  }|| || f}n|dkr| | }t | |d  d ||d  d  }t | |d  d ||d  d  }|| || f}nJ|dkr*| | }	|d |d | d  }
|d |d | d  }|	t |	d |
| d |d |  d     |
 }|	t |	d || d |d |  d     | }|\}}|\}}|d| |  }
|d| |  }|	t |	d |
| d|  |    |
 }|	t |	d || d|  |    | }t||f||fddd	 ||f}|S )
uh  

    References
    ----------

    .. [#] Krishnamoorthy, K., Jie Peng, and Dan Zhang. 2016. “Modified Large
       Sample Confidence Intervals for Poisson Distributions: Ratio, Weighted
       Average, and Product of Means.” Communications in Statistics - Theory
       and Methods 45 (1): 83–97. https://doi.org/10.1080/03610926.2013.821486.


    .. [#] Li, Yanhong, John J. Koval, Allan Donner, and G. Y. Zou. 2010.
       “Interval Estimation for the Area under the Receiver Operating
       Characteristic Curve When Data Are Subject to Error.” Statistics in
       Medicine 29 (24): 2521–31. https://doi.org/10.1002/sim.4015.

    .. [#] Zou, G. Y., and A. Donner. 2008. “Construction of Confidence Limits
       about Effect Measures: A General Approach.” Statistics in Medicine 27
       (10): 1693–1702. https://doi.org/10.1002/sim.3095.
    r   r         sumZratiogV瞯<g|=)ZatolZrtol)npsqrtr   )Zstat1Zstat2Zci1Zci2Zcontraststatlow_halfupp_halfciprodZterm1Zterm2Zlow_Zupp_Zlow1Zupp1Zlow2Zupp2lowZupp r   F/tmp/pip-unpacked-wheel-2v6byqio/statsmodels/stats/_inference_tools.py_mover_confint   sR    &&&&
((  r   c                 C   sV   |  d}tt ||d  d }tt ||d  d }| | | | f}|S )Nr   r   r   )r   r   r   )r	   r   Zstat_r
   r   r   r   r   _mover_confint_sumM   s
    
r   )r   )__doc__Znumpyr   Znumpy.testingr   r   r   r   r   r   r   <module>   s   
A