B
    Z                 @   s`   d Z dZdZd ZdZdZdZdZddlZ	dd	l
mZ dd
lmZmZ dd Zdd Zdd ZdS )zBreast Cancer DataZrestructuredtextz???z
This is the breast cancer data used in Owen's empirical likelihood.  It is taken from
Rice, J.A. Mathematical Statistics and Data Analysis.
http://www.cengage.com/statistics/discipline_content/dataLibrary.html
z#Breast Cancer and county populationz;The number of breast cancer observances in various countiesz::

    Number of observations: 301
    Number of variables: 2
    Variable name definitions:

        cancer - The number of breast cancer observances
        population - The population of the county

    N)utils)dirnameabspathc              C   s   t  } tj| ddtdS )z
    Load the data and return a Dataset class instance.

    Returns
    -------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.
    r   N)	endog_idxexog_idxdtype)	_get_dataduZprocess_recarrayfloat)data r   ?lib/python3.7/site-packages/statsmodels/datasets/cancer/data.pyload!   s    	r   c              C   s   t  } tj| dd tdS )Nr   )r   r   r   )r   r	   Zprocess_recarray_pandasr
   )r   r   r   r   load_pandas/   s    
r   c           	   C   s<   t tt} t| d d}tj|ddtd}W d Q R X |S )Nz/cancer.csvrb,T)Z	delimiternamesr   )r   r   __file__opennpZ
recfromtxtr
   )filepathfr   r   r   r   r   6   s    r   )__doc__Z__docformat__Z	COPYRIGHTZTITLEZSOURCEZ
DESCRSHORTZ	DESCRLONGZNOTEZnumpyr   Zstatsmodels.datasetsr   r	   os.pathr   r   r   r   r   r   r   r   r   <module>   s   