示例#1
0
 def __init__(self, regs, glmfit_kwargs=None, **kwargs):
     """
     Parameters
     ----------
     regs : list
       Names of sample attributes to be extracted from an input dataset and
       used as design matrix columns.
     glmfit_kwargs : dict, optional
       Keyword arguments to be passed to GeneralLinearModel.fit().
       By default an AR1 model is used.
     """
     GLMMapper.__init__(self, regs, **kwargs)
     if glmfit_kwargs is None:
         glmfit_kwargs = {}
     self.glmfit_kwargs = glmfit_kwargs
示例#2
0
 def __init__(self, regs, glmfit_kwargs=None, **kwargs):
     """
     Parameters
     ----------
     regs : list
       Names of sample attributes to be extracted from an input dataset and
       used as design matrix columns.
     glmfit_kwargs : dict, optional
       Keyword arguments to be passed to GeneralLinearModel.fit().
       By default an AR1 model is used.
     """
     GLMMapper.__init__(self, regs, **kwargs)
     if glmfit_kwargs is None:
         glmfit_kwargs = {}
     self.glmfit_kwargs = glmfit_kwargs
示例#3
0
 def __init__(self, regs, model_gen=None, results='params', **kwargs):
     """
     Parameters
     ----------
     regs : list
       Names of sample attributes to be extracted from an input dataset and
       used as design matrix columns.
     model_gen : callable, optional
       See UnivariateStatsModels documentation for details on the
       specification of the model fitting procedure. By default an
       OLS model is used.
     results : str or array, optional
       See UnivariateStatsModels documentation for details on the
       specification of model fit results. By default parameter
       estimates are returned.
     """
     GLMMapper.__init__(self, regs, **kwargs)
     self.result_expr = results
     if model_gen is None:
         model_gen = lambda y, x: sm.OLS(y, x)
     self.model_gen = model_gen
示例#4
0
 def __init__(self, regs, model_gen=None, results="params", **kwargs):
     """
     Parameters
     ----------
     regs : list
       Names of sample attributes to be extracted from an input dataset and
       used as design matrix columns.
     model_gen : callable, optional
       See UnivariateStatsModels documentation for details on the
       specification of the model fitting procedure. By default an
       OLS model is used.
     results : str or array, optional
       See UnivariateStatsModels documentation for details on the
       specification of model fit results. By default parameter
       estimates are returned.
     """
     GLMMapper.__init__(self, regs, **kwargs)
     self.result_expr = results
     if model_gen is None:
         model_gen = lambda y, x: sm.OLS(y, x)
     self.model_gen = model_gen