U
    Kvfÿ  ã                   @   sH   d Z ddlmZ dZdZe ZdZdZdZ	dZ
d	d
„ Zdd„ Zdd„ ZdS )z%RAND Health Insurance Experiment Dataé    )ÚutilsZrestructuredtextzThis is in the public domain.a9  
The data was collected by the RAND corporation as part of the Health
Insurance Experiment (HIE).

http://www.rand.org/health/projects/hie.html

This data was used in::

    Cameron, A.C. amd Trivedi, P.K. 2005.  `Microeconometrics: Methods
        and Applications,` Cambridge: New York.

And was obtained from: <http://cameron.econ.ucdavis.edu/mmabook/mmadata.html>

See randhie/src for the original data and description.  The data included
here contains only a subset of the original data.  The data varies slightly
compared to that reported in Cameron and Trivedi.
z-The RAND Co. Health Insurance Experiment DataÚ aä  ::

    Number of observations - 20,190
    Number of variables - 10
    Variable name definitions::

        mdvis   - Number of outpatient visits to an MD
        lncoins - ln(coinsurance + 1), 0 <= coninsurance <= 100
        idp     - 1 if individual deductible plan, 0 otherwise
        lpi     - ln(max(1, annual participation incentive payment))
        fmde    - 0 if idp = 1; ln(max(1, MDE/(0.01 coinsurance))) otherwise
        physlm  - 1 if the person has a physical limitation
        disea   - number of chronic diseases
        hlthg   - 1 if self-rated health is good
        hlthf   - 1 if self-rated health is fair
        hlthp   - 1 if self-rated health is poor
        (Omitted category is excellent self-rated health)
c                   C   s   t ƒ S )úæ
    Loads the RAND HIE data and returns a Dataset class.

    Returns
    -------
    Dataset
        See DATASET_PROPOSAL.txt for more information.

    Notes
    -----
    endog - response variable, mdvis
    exog - design
    )Úload_pandas© r   r   úE/tmp/pip-unpacked-wheel-2v6byqio/statsmodels/datasets/randhie/data.pyÚload2   s    r   c                   C   s   t jtƒ ddS )r   r   )Z	endog_idx)ÚduZprocess_pandasÚ	_get_datar   r   r   r   r   C   s    r   c                   C   s   t  td¡S )Nzrandhie.csv)r	   Zload_csvÚ__file__r   r   r   r   r
   T   s    r
   N)Ú__doc__Zstatsmodels.datasetsr   r	   Z__docformat__Z	COPYRIGHTZTITLEZSOURCEZ
DESCRSHORTZ	DESCRLONGZNOTEr   r   r
   r   r   r   r   Ú<module>   s   