ó
áp7]c           @   sb   d  Z  d d l m Z d Z d Z e  Z d Z d Z e Z	 d Z
 d d  Z d	   Z d
   Z d S(   s6   Spector and Mazzeo (1980) - Program Effectiveness Datai˙˙˙˙(   t   utilst   restructuredtextsM   Used with express permission of the original author, who
retains all rights. s  
http://pages.stern.nyu.edu/~wgreene/Text/econometricanalysis.htm

The raw data was downloaded from Bill Greene's Econometric Analysis web site,
though permission was obtained from the original researcher, Dr. Lee Spector,
Professor of Economics, Ball State University.s^   Experimental data on the effectiveness of the personalized
system of instruction (PSI) programsj  ::

    Number of Observations - 32

    Number of Variables - 4

    Variable name definitions::

        Grade - binary variable indicating whether or not a student's grade
                improved.  1 indicates an improvement.
        TUCE  - Test score on economics test
        PSI   - participation in program
        GPA   - Student's grade point average
c         C   s   t  j t   d |  S(   sj  
    Load the Spector dataset and returns a Dataset class instance.

    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_pandas(   t   dut   as_numpy_datasett   load_pandas(   R   (    (    s@   lib/python2.7/site-packages/statsmodels/datasets/spector/data.pyt   load%   s    c          C   s   t    }  t j |  d d S(   sŽ   
    Load the Spector dataset and returns a Dataset class instance.

    Returns
    -------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.
    t	   endog_idxi   (   t	   _get_dataR   t   process_pandas(   t   data(    (    s@   lib/python2.7/site-packages/statsmodels/datasets/spector/data.pyR   7   s    		c          C   sY   t  j t d d d }  t  j |   }  |  j d  d   d d d d g f }  |  j t  S(   Ns   spector.csvt   seps   \si   i   i   i   (   R   t   load_csvt   __file__t   strip_column_namest   iloct   astypet   float(   R
   (    (    s@   lib/python2.7/site-packages/statsmodels/datasets/spector/data.pyR   D   s    %N(   t   __doc__t   statsmodels.datasetsR    R   t   __docformat__t	   COPYRIGHTt   TITLEt   SOURCEt
   DESCRSHORTt	   DESCRLONGt   NOTEt   NoneR   R   R   (    (    (    s@   lib/python2.7/site-packages/statsmodels/datasets/spector/data.pyt   <module>   s   	