U
    Ãmœd	  ã                   @   sP   d Z ddlZddlmZ dZdZe ZdZ	dZ
e
ZdZd	d
„ Zdd„ Zdd„ ZdS )zGrunfeld (1950) Investment Dataé    N)ÚutilsÚrestructuredtextzThis is public domain.aŽ  This is the Grunfeld (1950) Investment Data.

The source for the data was the original 11-firm data set from Grunfeld's Ph.D.
thesis recreated by Kleiber and Zeileis (2008) "The Grunfeld Data at 50".
The data can be found here.
http://statmath.wu-wien.ac.at/~zeileis/grunfeld/

For a note on the many versions of the Grunfeld data circulating see:
http://www.stanford.edu/~clint/bench/grunfeld.htm
z2Grunfeld (1950) Investment Data for 11 U.S. Firms.ax  ::

    Number of observations - 220 (20 years for 11 firms)

    Number of variables - 5

    Variables name definitions::

        invest  - Gross investment in 1947 dollars
        value   - Market value as of Dec. 31 in 1947 dollars
        capital - Stock of plant and equipment in 1947 dollars
        firm    - General Motors, US Steel, General Electric, Chrysler,
                Atlantic Refining, IBM, Union Oil, Westinghouse, Goodyear,
                Diamond Match, American Steel
        year    - 1935 - 1954

    Note that raw_data has firm expanded to dummy variables, since it is a
    string categorical variable.
c                   C   s   t ƒ S )á#  
    Loads the Grunfeld data and returns a Dataset class.

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

    Notes
    -----
    raw_data has the firm variable expanded to dummy variables for each
    firm (ie., there is no reference dummy)
    )Úload_pandas© r   r   ú[/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/statsmodels/datasets/grunfeld/data.pyÚload-   s    r   c                  C   s6   t ƒ } | j t¡| _t | ¡}tj| dd�}||_|S )r   r   )Z	endog_idx)	Ú	_get_dataÚyearZastypeÚfloatÚpdZget_dummiesÚduZprocess_pandasÚraw_data)Údatar   Zdsr   r   r   r   =   s    
r   c                  C   s   t  td¡} | S )Nzgrunfeld.csv)r   Zload_csvÚ__file__)r   r   r   r   r	   S   s    r	   )Ú__doc__Zpandasr   Zstatsmodels.datasetsr   r   Ú__docformat__Z	COPYRIGHTZTITLEZSOURCEZ
DESCRSHORTZ	DESCRLONGÚNOTEr   r   r	   r   r   r   r   Ú<module>   s   