
p7]c           @   sz  d  d l  Z  d  d l Z d  d l m Z m Z m Z m Z m Z d  d l Z	 d  d l
 m Z d  d l m Z m Z m Z m Z d d l m Z d d  Z d	 d
  Z d d d d d d d  Z d d d  Z d d d d d d  Z d d d e e d d  Z d d d e d  Z d d d d d  Z d d d e e e d  Z e d  Z d d  Z  d e! f d     YZ" d S(   iN(   t   ranget   lranget   lmapt   lzipt   zip_longest(   t   SimpleTable(   t   gen_fmtt   fmt_2t
   fmt_paramst	   fmt_2colsi   (   t   _model_typesi   c         C   s   | d k rC t  |   d k s0 t  |   d k  r8 d |  Sd |  Sn[ | d k r t  |   d k ss t  |   d k  r{ d |  Sd |  Sn t d	 j d
 |    d  S(   Ni   g     @g-C6?s   %9.3gs   %9.3fi   s   %10.4gs   %10.4fs1   `prec` argument must be either 3 or 4, not {prec}t   prec(   t   abst
   ValueErrort   format(   t   xR   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   forg   s    $$i   c         C   sC   t  j |   r | d d d S|  d |  k r7 d |  Sd |  Sd S(   sm  convert number to string with either integer of float formatting

    This is used internally for nobs and degrees of freedom which are usually
    integers but can be float in some cases.

    Parameters
    ----------
    x : int or float
    width : int
        only used if x is nan

    Returns
    -------
    str : str
        number as formatted string
    i   t    t   NaNi   s   %#6ds   %#8.2fN(   t   npt   isnan(   R   t   width(    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   d_or_f   s
    i    g?t   textc   '         sz  | d k r" t  |  j j j } n  | d% k	 rj t |  t |  j  k rj t d j t |  j     n  t	 |  | |  \ } } t
 j   } t
 j d |  g } t
 j d |  }	 |  j j j }
 |  j } |  j } |  j } d |
 g f d |	 g f d | f d | g f g } t |   \ } } | } d% } t | | | d	 | d
 t } d& } |
 g | | g | g f } t | | | d	 | d
 t } | j |  |   i |  j   d 6|  j   d 6|  j   d 6|  j   d 6|  j   d 6|  j   d 6} i |  j d 6|  j d 6|  j d 6|  j d 6|  j d 6|  j d 6} t d | d  d } i d d d d | d g d 6d d d d | d g d 6d d d d | d g d 6d d d d | d g d 6d d d d | d g d 6d d d d | d g d 6} | } |  j } |  j |  } |  j } t t |   } | |
 }  | |
 }! t g  | D] }" d | |" ^ qGg  | D] }" d  | |" ^ qeg  | D] }" d  |  |" ^ qg  | D] }" d  |! |" ^ qg  | D] }" d! t | |"  ^ q }# t |# | |
 | d	 d% d
 t     f d"   }$    f d#   }% i |$ d 6|% d 6}& | d$ k rvy |& |
   SWqvt k
 rr|& d   SXn  d% S('   s  
    Parameters
    ----------
    yname : string
            optional, Default is `Y`
    xname : list of strings
            optional, Default is `X.#` for # in p the number of regressors
    Confidance interval : (0,1) not implimented
    title : string
            optional, Defualt is 'Generalized linear model'
    returns : string
              'text', 'table', 'csv', 'latex', 'html'

    Returns
    -------
    Default :
    returns='print'
            Prints the summarirized results

    Option :
    returns='text'
            Prints the summarirized results

    Option :
    returns='table'
             SimpleTable instance : summarizing the fit of a linear model.

    Option :
    returns='csv'
            returns a string of csv of the results, to import into a spreadsheet

    Option :
    returns='latex'
    Not implimented yet

    Option :
    returns='HTML'
    Not implimented yet


    Examples (needs updating)
    --------
    >>> import statsmodels as sm
    >>> data = sm.datasets.longley.load(as_pandas=False)
    >>> data.exog = sm.add_constant(data.exog)
    >>> ols_results = sm.OLS(data.endog, data.exog).results
    >>> print ols_results.summary()
    ...

    Notes
    -----
    conf_int calculated from normal dist.
    i    sa   User supplied xnames must have the same number of entries as the number of model parameters ({0})s   %H:%M:%Ss   %a, %d %b %Ys   Model type:s   Date:s   Dependent Variable:s   df modelt   titlet   txt_fmts   Method:s   Time:s   Number of Obs:s   df residt   OLSt   GLSt   GLSARt   WLSt   RLMt   GLMi   id   t   %t   coefs   std errt   ts   P>|t|s    Conf. Intervalt   zs   P>|z|s   %#6.4gs   %#6.4fs   (%#5g, %#5g)c             s   t     d t    }  |  S(   s4   
        print summary table for ols models
        s   
(   t   str(   t   table(   t   general_tablet   parameter_table(    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   ols_printer   s    c             s   t     d t    }  |  S(   Ns   
(   R$   (   R%   (   R&   R'   (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   glm_printer   s    t   printN(   s   Method:s   Time:s   Number of Obs:s   df resid(   R
   t   modelt	   __class__t   __name__t   Nonet   lent   paramsR   R   t	   _getnamest   timet	   localtimet   strftimet   nobst   df_modelt   df_residR   R   R   t   extend_rightR"   t   pvaluesR$   t   conf_intt   bseR   R   t   tupleR   t   KeyError('   t   selft   ynamet   xnameR   t   alphat   returnst
   model_infot   time_nowt   time_of_dayt   datet	   modeltypeR5   R6   R7   t   gen_leftt   gen_stubs_leftt   gen_data_leftt	   gen_titlet
   gen_headert   gen_table_leftt   gen_stubs_rightt   gen_data_rightt   gen_table_rightt   tstatst
   prob_statst   alpt   param_headert   params_stubsR0   R:   t   std_errt   exog_lent   tstatt	   prob_statt   it   params_dataR(   R)   t   printers(    (   R&   R'   s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   summary7   s    7'						   	



		

!*	c         C   s   | d k r? t |  j d d  d k	 r6 |  j j } q? d } n  | d k r t |  j d d  d k	 ru |  j j } q g  t t |  j   D] } d | ^ q } n  | | f S(   s0   extract names from model or construct names
    t   endog_namest   yt
   exog_namess   var_%dN(   R.   t   getattrR+   R^   R`   R    R/   R0   (   R>   R?   R@   RZ   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyR1      s    	/c            s  | | } } t  j   } t  j d |  g  t  j d |    t  d  d | \  } t d  f d   f d  f d   f d	  f d
   f d   f d   f d  f d   f d  f d   f d  f d   f d  f d   f d  f d   f d  f d   f g
  }	 | d# k r@ j j j d } n  | d# k rd$ d% d& d' d( d) g } y  j	 }
 | j
 d*  Wn n Xg  } n  | } d# } g  } xC | D]; \ } } | d# k r|	 |   } n  | j
 | | f  qW| } | rJg  } xC | D]; \ } } | d# k r*|	 |   } n  | j
 | | f  qW| } n  g  | | D] \ } } | d# k rU| ^ qU} | g  k st |   | rot |  t |  k  r| d+ g t |  t |  7} n< t |  t |  k r| d, g t |  t |  7} n  g  | D]  \ } } d d  | | f ^ q} t |   \ } } t | | | d! | d" t } n g  } t |   \ } } t | | | d! | d" t } | j |  | } | S(-   s   generate top table(s)


    TODO: this still uses predefined model_methods
    ? allow gleft, gright to be 1 element tuples instead of filling with None?

    s   %H:%M:%Ss   %a, %d %b %YR?   R@   s   Dependent Variable:c              s     g S(   N(    (    (   R?   (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   <lambda>  t    s   Dep. Variable:c              s     g S(   N(    (    (   R?   (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyRb     Rc   s   Model:c              s     j  j j g S(   N(   R+   R,   R-   (    (   t   results(    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyRb     Rc   s   Date:c              s     g S(   N(    (    (   RF   (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyRb      Rc   s   Time:c              s     S(   N(    (    (   RE   (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyRb   !  Rc   s   Number of Obs:c              s
     j  g S(   N(   R5   (    (   Rd   (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyRb   "  Rc   s   No. Observations:c              s   t    j  g S(   N(   R   R5   (    (   Rd   (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyRb   #  Rc   s	   Df Model:c              s   t    j  g S(   N(   R   R6   (    (   Rd   (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyRb   $  Rc   s   Df Residuals:c              s   t    j  g S(   N(   R   R7   (    (   Rd   (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyRb   %  Rc   s   Log-Likelihood:c              s   d   j  g S(   Ns   %#8.5g(   t   llf(    (   Rd   (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyRb   &  Rc   s   Regression Resultss   Model type:s	   Df model:s	   Df resid:s   Log-LikelihoodR   s   %-21ss     R   R   N(   s   Dep. Variable:N(   s   Model type:N(   s   Date:N(   s   No. Observations:N(   s	   Df model:N(   s	   Df resid:N(   s   Log-LikelihoodN(   R   R   (   R   R   (   R2   R3   R4   R1   t   dictR.   R+   R,   R-   Re   t   appendt   AssertionErrorR/   R   R   R	   R8   (   Rd   R   t   gleftt   grightR?   R@   RH   t	   gen_rightRD   t   default_itemsRe   RK   RL   t	   gen_left_t   itemt   valuet
   gen_right_t   kt   vt   missing_valuesRN   RO   RP   RI   RJ   RM   R&   (    (   RF   Rd   RE   R?   s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   summary_top  s    					/$$-	c         C   s=  t  |  t  r* |  \ }  } } }	 }
 } n3 |  j } |  j } |  j }	 |  j }
 |  j |  } | r d d d d d t | d  t d | d  d g } n8 d d d	 d
 d t | d  t d | d  d g } | r d } n  t	 |  d | d | \ } } t
 |  t
 |  k r*t d   n  | } t t
 |   } t g  | D] } t | | d d ^ qLg  | D] } t | |  ^ qrg  | D] } t |	 |  ^ qg  | D] } d |
 | ^ qg  | D] } t | | d f  ^ qg  | D] } t | | d f  ^ q } t | | | d | d t } | S(   s,  create a summary table for the parameters

    Parameters
    ----------
    res : results instance
        some required information is directly taken from the result
        instance
    yname : string or None
        optional name for the endogenous variable, default is "y"
    xname : list of strings or None
        optional names for the exogenous variables, default is "var_xx"
    alpha : float
        significance level for the confidence intervals
    use_t : bool
        indicator whether the p-values are based on the Student-t
        distribution (if True) or on the normal distribution (if False)
    skip_headers : bool
        If false (default), then the header row is added. If true, then no
        header row is added.

    Returns
    -------
    params_table : SimpleTable instance
    R!   s   std errR"   s   P>|t|t   [i   i   t   ]R#   s   P>|z|R?   R@   s-   xnames and params do not have the same lengthR   i   s   %#6.3fi    R   R   N(   t
   isinstanceR<   R0   R;   t   tvaluesR9   R:   R$   R.   R1   R/   R   R   R   R   R   R   (   Rd   R?   R@   RA   t   use_tt   skip_headerR   R0   RV   Rx   R9   R:   RT   t   _RU   t   exog_idxRZ   R[   R'   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   summary_params{  s>     				/,	)  &,	c         C   s   t  |  t  r* |  \ }  } } } } }	 n3 |  j } |  j } |  j } |  j } |  j |  }	 | r~ d d d d d d g }
 n d d d d d d g }
 t |  d	 | d
 | \ } } d d l m	 } t
 j | | | | |	 f  } | | d |
 d | S(   s,  create a summary table for the parameters

    Parameters
    ----------
    res : results instance
        some required information is directly taken from the result
        instance
    yname : string or None
        optional name for the endogenous variable, default is "y"
    xname : list of strings or None
        optional names for the exogenous variables, default is "var_xx"
    alpha : float
        significance level for the confidence intervals
    use_t : bool
        indicator whether the p-values are based on the Student-t
        distribution (if True) or on the normal distribution (if False)
    skip_headers : bool
        If false (default), then the header row is added. If true, then no
        header row is added.

    Returns
    -------
    params_table : SimpleTable instance
    R!   s   std errR"   s   P>|t|s   Conf. Int. Lows   Conf. Int. Upp.R#   s   P>|z|R?   R@   i(   t	   DataFramet   columnst   index(   Rw   R<   R0   R;   Rx   R9   R:   R1   t   pandasR~   R   t   column_stack(   Rd   R?   R@   RA   Ry   R0   RV   Rx   R9   R:   RT   R{   R~   R%   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   summary_params_frame  s      				c         C   s   | d k r? g  t j |  j j  d D] } d | ^ q& } n  | d k rz g  t t |  j   D] } d | ^ qa } n  g  |  j D]+ } g  | D] } t | d d ^ q ^ q } | rg  | D]Y }	 g  t	 |  |	  D]= }
 g  |
 D]* } d d t | d d j
   d	 ^ q ^ q ^ q } t | |  } g  | D] } | D] } | ^ qAq7} t | d
 g t |  g t |   } g  | D] } | D] } | ^ qq} n | } | } t j t  } d g |  j j d | d <t | d | d | d | d | S(   s  create summary table of regression parameters with several equations

    This allows interleaving of parameters with bse and/or tvalues

    Parameters
    ----------
    result : result instance
        the result instance with params and attributes in extras
    extras : list of strings
        additional attributes to add below a parameter row, e.g. bse or tvalues
    endog_names : None or list of strings
        names for rows of the parameter array (multivariate endog)
    exog_names : None or list of strings
        names for columns of the parameter array (exog)
    alpha : float
        level for confidence intervals, default 0.95
    title : None or string

    Returns
    -------
    tables : list of SimpleTable
        this contains a list of all seperate Subtables
    table_all : SimpleTable
        the merged table with results concatenated for each row of the parameter
        array

    i   s   endog_%ds   var%dR   i   s   %10st   (i   t   )Rc   s   %st	   data_fmtst   headerst   stubsR   R   N(   R.   R   t   uniqueR+   t   endogR    R/   R0   R   Ra   t   stripR   t   copyt   deepcopyR   t   shapeR   (   t   resultt   extrasR^   R`   R   RZ   t   rowRn   t
   res_paramst   whatt   colRr   t   extras_listt   datat   jR   R   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   summary_params_2d  s*    0/;c&))c         C   s  |  } | j  } | j d k rV | j d }	 t |  | j d k r t d   q n- t |  t |  k r} t d   n  d }	 t | t  s | d k r d }
 n | }
 | j j	 d } n  g  } x t
 |	  D] } | | j  d d  | f | j d d  | f | j d d  | f | j d d  | f | j |  | f } t } t | d | | d | d | d	 | d
 | } | j |  q Wx+ t
 t |   D] } | | | | _ qWt | d | } | | f S(   s  summary table for parameters that are 2d, e.g. multi-equation models

    Parameters
    ----------
    result : result instance
        the result instance with params, bse, tvalues and conf_int
    endog_names : None or list of strings
        names for rows of the parameter array (multivariate endog)
    exog_names : None or list of strings
        names for columns of the parameter array (exog)
    alpha : float
        level for confidence intervals, default 0.95
    use_t : bool
        indicator whether the p-values are based on the Student-t
        distribution (if True) or on the normal distribution (if False)
    keep_headers : bool
        If true (default), then sub-tables keep their headers. If false, then
        only the first headers are kept, the other headerse are blanked out
    endog_cols : bool
        If false (default) then params and other result statistics have
        equations by rows. If true, then equations are assumed to be in columns.
        Not implemented yet.

    Returns
    -------
    tables : list of SimpleTable
        this contains a list of all seperate Subtables
    table_all : SimpleTable
        the merged table with results concatenated for each row of the parameter
        array

    i   i   s   endog_names has wrong lengthR   NR?   R@   RA   Ry   Rz   t   keep_headers(   R0   t   ndimR   R/   R   Rw   t   listR.   R+   R^   R    R;   Rx   R9   R:   t   FalseR}   Rg   R   t   table_extend(   R   R^   R`   RA   Ry   R   t
   endog_colst   resR0   t   n_equt   endog_basenamet   tablest   eqt   restupt   skipht   tbleRZ   t	   table_all(    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   summary_params_2dflatE  s6    #		E,	c         C   s  d d l  m } x t |   D] \ } } | |  } | d j d k r | j | d d _ d
 | d d _ | d d j | d d _ | r | d k r x" | d d D] } d | _ q Wq n  | d k r | } q | d } | j	 d d d	 | j
 |  q Wd
 | _ | S(   s  extend a list of SimpleTables, adding titles to header of subtables

    This function returns the merged table as a deepcopy, in contrast to the
    SimpleTable extend method.

    Parameters
    ----------
    tables : list of SimpleTable instances
    keep_headers : bool
        If true, then all headers are kept. If falls, then the headers of
        subtables are blanked out.

    Returns
    -------
    table_all : SimpleTable
        merged tables as a single SimpleTable instance

    i(   R   i    t   headeri   Rc   t   txtt   row_dec_belowt   -N(   R   R   t	   enumeratet   datatypeR   R   R.   t	   _datatypeR   t
   add_formatt   extend(   R   R   R   t   iiR"   t   cR   t   r1(    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyR     s"    	
	c         C   s   | d k r@ d   } d j  t | |  d   t |  d  g  S| d k rP |  S| d k rs d j  d   |  D  S| d k r t j |  d	  } | d =x |  d
 D] } | j |  q W| j   S| d k r d j  d   |  D  St d   d  S(   NR   c         S   s   t  |   j d d  d S(   Ns   
i   i    (   R$   t   rsplit(   R   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyRb     Rc   s   
iR   t   csvc         s   s   |  ] } | j    Vq d  S(   N(   t   as_csv(   t   .0R   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pys	   <genexpr>  s    t   latexi    i   t   htmlc         s   s   |  ] } | j    Vq d  S(   N(   t   as_html(   R   R%   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pys	   <genexpr>  s    s3   available output formats are text, csv, latex, html(   t   joinR   R$   R   R   R   t   as_latex_tabularR   (   R   t
   return_fmtt   strdropR%   t   part(    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   summary_return  s     	+
t   Summaryc           B   s   e  Z d  Z d   Z d   Z d   Z d   Z d d d d d d  Z d d d e	 d  Z
 d   Z d	   Z d
   Z d   Z d   Z RS(   s  class to hold tables for result summary presentation

    Construction does not take any parameters. Tables and text can be added
    with the `add_` methods.

    Attributes
    ----------
    tables : list of tables
        Contains the list of SimpleTable instances, horizontally concatenated
        tables are not saved separately.
    extra_txt : string
        extra lines that are added to the text output, used for warnings
        and explanations.
    c         C   s   g  |  _  d  |  _ d  S(   N(   R   R.   t	   extra_txt(   R>   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   __init__  s    	c         C   s
   |  j    S(   N(   t   as_text(   R>   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   __str__  s    c         C   s"   t  t |    d |  j   d S(   Ns   
"""
s   
"""(   R$   t   typeR   (   R>   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   __repr__  s    c         C   s
   |  j    S(   s$   Display as HTML in IPython notebook.(   R   (   R>   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   _repr_html_  s    c         C   s>   t  | d | d | d | d | d | } |  j j |  d S(   sr  add a double table, 2 tables with one column merged horizontally

        Parameters
        ----------
        res : results instance
            some required information is directly taken from the result
            instance
        title : string or None
            if None, then a default title is used.
        gleft : list of tuples
            elements for the left table, tuples are (name, value) pairs
            If gleft is None, then a default table is created
        gright : list of tuples or None
            elements for the right table, tuples are (name, value) pairs
        yname : string or None
            optional name for the endogenous variable, default is "y"
        xname : list of strings or None
            optional names for the exogenous variables, default is "var_xx"

        Returns
        -------
        None : tables are attached

        R   Ri   Rj   R?   R@   N(   Rt   R   Rg   (   R>   R   R   Ri   Rj   R?   R@   R%   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   add_table_2cols  s    g?c      
   C   s   | j  j d k r9 t | d | d | d | d | } nK | j  j d k rx t | d | d | d | d | \ } } n t d	   |  j j |  d
 S(   s  create and add a table for the parameter estimates

        Parameters
        ----------
        res : results instance
            some required information is directly taken from the result
            instance
        yname : string or None
            optional name for the endogenous variable, default is "y"
        xname : list of strings or None
            optional names for the exogenous variables, default is "var_xx"
        alpha : float
            significance level for the confidence intervals
        use_t : bool
            indicator whether the p-values are based on the Student-t
            distribution (if True) or on the normal distribution (if False)

        Returns
        -------
        None : table is attached

        i   R?   R@   RA   Ry   i   R^   R`   s   params has to be 1d or 2dN(   R0   R   R}   R   R   R   Rg   (   R>   R   R?   R@   RA   Ry   R%   R{   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   add_table_params  s    c         C   s   d j  |  |  _ d S(   s   add additional text that will be added at the end in text format

        Parameters
        ----------
        etext : list[str]
            string with lines that are added to the text output.

        s   
N(   R   R   (   R>   t   etext(    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   add_extra_txt8  s    	c         C   s<   t  |  j d d } |  j d k	 r8 | d |  j } n  | S(   s   return tables as string

        Returns
        -------
        txt : string
            summary tables and extra text as one string

        R   R   s   

N(   R   R   R   R.   (   R>   R   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyR   C  s    	c         C   sH   t  |  j d d } |  j d k	 rD | d |  j j d d  } n  | S(   sY  return tables as string

        Returns
        -------
        latex : string
            summary tables and extra text as string of Latex

        Notes
        -----
        This currently merges tables with different number of columns.
        It is recommended to use `as_latex_tabular` directly on the individual
        tables.

        R   R   s   

s   
s    \newline
 N(   R   R   R   R.   t   replace(   R>   R   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   as_latexQ  s     c         C   s<   t  |  j d d } |  j d k	 r8 | d |  j } n  | S(   s   return tables as string

        Returns
        -------
        csv : string
            concatenated summary tables in comma delimited format

        R   R   s   

N(   R   R   R   R.   (   R>   R   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyR   e  s    	c         C   sH   t  |  j d d } |  j d k	 rD | d |  j j d d  } n  | S(   s   return tables as string

        Returns
        -------
        html : string
            concatenated summary tables in HTML format

        R   R   s
   <br/><br/>s   
s   <br/>N(   R   R   R   R.   R   (   R>   R   (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyR   s  s    	 N(   R-   t
   __module__t   __doc__R   R   R   R   R.   R   t   TrueR   R   R   R   R   R   (    (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyR     s   						"				(#   R   R2   t   statsmodels.compat.pythonR    R   R   R   R   t   numpyR   t   statsmodels.iolib.tableR   t!   statsmodels.iolib.tableformattingR   R   R   R	   t   summary2R
   R   R   R.   R]   R1   Rt   R   R   R}   R   R   R   R   R   t   objectR   (    (    (    s8   lib/python2.7/site-packages/statsmodels/iolib/summary.pyt   <module>   s.   ("sP	;	<	O-