ó
áp7]c           @   sY   d  Z  d d l m Z d Z d Z e  Z d Z d Z d Z	 d Z
 d	   Z d d
  Z d S(   s1   Smoking and lung cancer in eight cities in China.i˙˙˙˙(   t   utilst   restructuredtexts   Intern. J. Epidemiol. (1992)sq   
Transcribed from Z. Liu, Smoking and Lung Cancer Incidence in China,
Intern. J. Epidemiol., 21:197-201, (1992).
s=   Co-occurrence of lung cancer and smoking in 8 Chinese cities.sw   This is a series of 8 2x2 contingency tables showing the co-occurrence
of lung cancer and smoking in 8 Chinese cities.
s  ::

    Number of Observations - 8
    Number of Variables - 3
    Variable name definitions::

        city_name - name of the city
        smoking - yes or no, according to a person's smoking behavior
        lung_cancer - yes or no, according to a person's lung cancer status
c          C   sF   t  j t d  }  |  j d  } t  j d | d d  } |  | _ | S(   sł   
    Load the China smoking/lung cancer data and return a Dataset class.

    Returns
    -------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.
    s   china_smoking.csvt   Locationt   datat   titles*   Smoking and lung cancer in Chinese regions(   t   dut   load_csvt   __file__t	   set_indext   Datasett   raw_data(   R
   R   t   dset(    (    sF   lib/python2.7/site-packages/statsmodels/datasets/china_smoking/data.pyt   load_pandas   s
    		c         C   s   t  j t   d |  d t S(   so  
    Load the China smoking/lung cancer data and return a Dataset class.

    Parameters
    ----------
    as_pandas : bool
        Flag indicating whether to return pandas DataFrames and Series
        or numpy recarrays and arrays.  If True, returns pandas.

    Returns
    -------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.
    t	   as_pandast   retain_index(   R   t   as_numpy_datasetR   t   True(   R   (    (    sF   lib/python2.7/site-packages/statsmodels/datasets/china_smoking/data.pyt   load/   s    N(   t   __doc__t   statsmodels.datasetsR    R   t   __docformat__t	   COPYRIGHTt   TITLEt   SOURCEt
   DESCRSHORTt	   DESCRLONGt   NOTER   t   NoneR   (    (    (    sF   lib/python2.7/site-packages/statsmodels/datasets/china_smoking/data.pyt   <module>   s   	