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Name of dataset.ZrestructuredtextzThis is public domain.z"Engel (1857) food expenditure dataae  
This dataset was used in Koenker and Bassett (1982) and distributed alongside
the ``quantreg`` package for R.

Koenker, R. and Bassett, G (1982) Robust Tests of Heteroscedasticity based on
Regression Quantiles; Econometrica 50, 43-61.

Roger Koenker (2012). quantreg: Quantile Regression. R package version 4.94.
http://CRAN.R-project.org/package=quantreg
zEngel food expenditure data.zUData on income and food expenditure for 235 working class households in 1857 Belgium.z::

    Number of observations: 235
    Number of variables: 2
    Variable name definitions:
        income - annual household income (Belgian francs)
        foodexp - annual household food expenditure (Belgian francs)
    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/engel/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_pandas4   s    
r   c           	   C   s<   t tt} t| d d}tj|ddtd}W d Q R X |S )Nz
/engel.csvrb,T)Z	delimiternamesr   )r   r   __file__opennpZ
recfromtxtr
   )filepathfr   r   r   r   r   ;   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   

