Module Import alias identifier Import alias identifier Import alias Import alias identifier Import alias Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If CompareIs NameLoad NameLoad body Assign NameStore Dict If CompareIs NameLoad NameLoad body Assign NameStore Dict If CompareIs AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Call AttributeLoad NameLoad attr Str body Raise Call NameLoad Str Assign NameStore BinOpAdd BinOpAdd Call NameLoad Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad NameLoad Assign NameStore ListComp AttributeLoad SubscriptLoad NameLoad Index NameLoad attr comprehension NameStore NameLoad Assign NameStore BinOpSub Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad ListLoad AttributeLoad NameLoad attr Assign NameStore BinOpSub NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad Str attr ListComp BinOpMod Str NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Num Num NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr ExtSlice Slice Index NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr ExtSlice Slice Index NameLoad Call SubscriptLoad NameLoad Index NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index NameLoad For NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr ExtSlice Slice Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad keyword Str Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Dict If CompareIs NameLoad NameLoad body Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpAdd BinOpAdd Call NameLoad Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad NameLoad Assign NameStore BinOpSub Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad Str attr ListComp BinOpMod Str NameLoad comprehension NameStore NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Num Num NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index NameLoad NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Index NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Index NameLoad Call SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad For NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Index NameLoad SubscriptLoad NameLoad Index NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body If Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str body Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad orelse Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Assign NameStore Dict If CompareIs NameLoad NameLoad body Assign NameStore Dict If CompareIs NameLoad NameLoad body Assign NameStore Dict If CompareIs NameLoad NameLoad body Assign NameStore Dict For TupleStore NameStore NameStore TupleLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore BinOpBitAnd Call NameLoad Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad If CompareGt Call NameLoad NameLoad Num body Raise Call NameLoad BinOpAdd Str Call AttributeLoad Str attr NameLoad Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad Num Str NameLoad Num NameLoad NameLoad kwarg body If CompareNotIn NameLoad TupleLoad Str Str Str body Raise Call NameLoad Str Assign NameStore BoolOpOr CompareIsNot NameLoad NameLoad CompareIsNot NameLoad NameLoad If BoolOpAnd NameLoad UnaryOpNot NameLoad body Raise Call NameLoad Str Assign NameStore AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body If Call NameLoad GeneratorExp CompareIsNot NameLoad NameLoad comprehension NameStore ListLoad NameLoad NameLoad NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad keyword Str Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad keyword Str Assign NameStore NameLoad orelse Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad If CompareGt BinOpAdd Call NameLoad NameLoad Call NameLoad NameLoad Num body Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad ImportFrom alias ImportFrom alias If Call NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Dict Str NameLoad orelse Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad Num ImportFrom alias identifier Assign NameStore SubscriptLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Index Num Assign NameStore BinOpSub SubscriptLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Index Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpSub Num NameLoad NameLoad NameLoad Assign NameStore BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Index Num BinOpSub NameLoad NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Index Num BinOpAdd NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Num Assign SubscriptStore NameLoad ExtSlice Slice Index Num BinOpSub NameLoad BinOpMult NameLoad NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Index Num BinOpAdd NameLoad BinOpMult NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list Assign AttributeStore NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore BinOpDiv NameLoad NameLoad Assign NameStore AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr Assign NameStore Call AttributeLoad BinOpMult Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr AugAssignDiv NameStore Call AttributeLoad NameLoad attr NameLoad AugAssignDiv NameStore SubscriptLoad NameLoad ExtSlice Slice Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad BinOpPow NameLoad Num attr Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr ImportFrom alias FunctionDef arguments args NameParam defaults body Return BinOpSub BinOpAdd BinOpDiv BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpDiv UnaryOpUSub BinOpPow NameLoad Num Num AttributeLoad NameLoad attr BinOpMult Num BinOpSub Num Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list ImportFrom alias Assign TupleStore NameStore NameStore Call NameLoad NameLoad Num Num keyword NameLoad If CompareEq AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Return TupleLoad NameLoad NameLoad decorator_list
N/A N/A statsmodels.api sm N/A pandas pd N/A patsy N/A numpy np N/A warnings N/A 
A predict-like function that constructs means and pointwise or
simultaneous confidence bands for the function f(x) = E[Y | X*=x,
X1=x1, ...], where X* is the focus variable and X1, X2, ... are
non-focus variables.  This is especially useful when conducting a
functional regression in which the role of x is modeled with b-splines
or other basis functions.
 N/A _predict_functional_doc 
    Predictions and contrasts of a fitted model as a function of a given covariate.

    The value of the focus variable varies along a sequence of its
    quantiles, calculated from the data used to fit the model.  The
    other variables are held constant either at given values, or at
    values obtained by applying given summary functions to the data
    used to fit the model.  Optionally, a second specification of the
    non-focus variables is provided and the contrast between the two
    specifications is returned.

    Parameters
    ----------
    result : statsmodels result object
        A results object for the fitted model.
    focus_var : string
        The name of the 'focus variable'.
    summaries : dict-like
        A map from names of non-focus variables to summary functions.
        Each summary function is applied to the data used to fit the
        model, to obtain a value at which the variable is held fixed.
    values : dict-like
        Values at which a given non-focus variable is held fixed.
    summaries2 : dict-like
        A second set of summary functions used to define a contrast.
    values2 : dict-like
        A second set of fixed values used to define a contrast.
    alpha : float
        `1 - alpha` is the coverage probability.
    ci_method : string
        The method for constructing the confidence band, one of
        'pointwise', 'scheffe', and 'simultaneous'.
    num_points : integer
        The number of equally-spaced quantile points where the
        prediction is made.
    exog : array-like
        Explicitly provide points to cover with the confidence band.
    exog2 : array-like
        Explicitly provide points to contrast to `exog` in a functional
        confidence band.
    kwargs :
        Arguments passed to the `predict` method.

    Returns
    -------
    pred : array-like
        The predicted mean values.
    cb : array-like
        An array with two columns, containing respectively the lower
        and upper limits of a confidence band.
    fvals : array-like
        The values of the focus variable at which the prediction is
        made.

    Notes
    -----
    All variables in the model except for the focus variable should be
    included as a key in either `summaries` or `values` (unless `exog`
    is provided).

    If `summaries2` and `values2` are not provided, the returned value
    contains predicted conditional means for the outcome as the focus
    variable varies, with the other variables fixed as specified.

    If `summaries2` and/or `values2` is provided, two sets of
    predicted conditional means are calculated, and the returned value
    is the contrast between them.

    If `exog` is provided, then the rows should contain a sequence of
    values approximating a continuous path through the domain of the
    covariates.  For example, if Z(s) is the covariate expressed as a
    function of s, then the rows of exog may approximate Z(g(s)) for
    some continuous function g.  If `exog` is provided then neither of
    the summaries or values arguments should be provided.  If `exog2`
    is also provided, then the returned value is a contrast between
    the functionas defined by `exog` and `exog2`.

    Examples
    --------
    Fit a model using a formula in which the predictors are age
    (modeled with splines), ethnicity (which is categorical), gender,
    and income.  Then we obtain the fitted mean values as a function
    of age for females with mean income and the most common
    ethnicity.

    >>> model = sm.OLS.from_formula('y ~ bs(age, df=4) + C(ethnicity) + gender + income', data)
    >>> result = model.fit()
    >>> mode = lambda x : x.value_counts().argmax()
    >>> summaries = {'income': np.mean, ethnicity=mode}
    >>> values = {'gender': 'female'}
    >>> pr, cb, x = predict_functional(result, 'age', summaries, values)

    Fit a model using arrays.  Plot the means as a function of x3,
    holding x1 fixed at its mean value in the data used to fit the
    model, and holding x2 fixed at 1.

    >>> model = sm.OLS(y ,x)
    >>> result = model.fit()
    >>> summaries = {'x1': np.mean}
    >>> values = {'x2': 1}
    >>> pr, cb, x = predict_functional(result, 'x3', summaries, values)

    Fit a model usng a formula and construct a contrast comparing the
    female and male predicted mean functions.

    >>> model = sm.OLS.from_formula('y ~ bs(age, df=4) + gender', data)
    >>> result = model.fit()
    >>> values = {'gender': 'female'}
    >>> values2 = {'gender': 'male'}
    >>> pr, cb, x = predict_functional(result, 'age', values=values, values2=values2)
     _make_exog_from_formula N/A N/A result focus_var summaries values num_points N/A N/A N/A 
    Create dataframes for exploring a fitted model as a function of one variable.

    This works for models fit with a formula.

    Returns
    -------
    dexog : data frame
        A data frame in which the focus variable varies and the other variables
        are fixed at specified or computed values.
    fexog : data frame
        The data frame `dexog` processed through the model formula.
     N/A model N/A result model N/A exog N/A N/A model data frame N/A N/A summaries None N/A N/A summaries N/A N/A N/A values None N/A N/A values N/A N/A N/A N/A N/A exog N/A focus_var dtype N/A N/A np dtype O N/A N/A N/A ValueError focus variable may not have object type N/A colnames N/A N/A N/A list N/A N/A summaries keys N/A list N/A N/A values keys N/A focus_var N/A dtypes N/A N/A N/A exog N/A x dtype N/A x colnames N/A varl N/A N/A set N/A N/A N/A exog columns tolist N/A set N/A N/A model endog_names N/A unmatched N/A varl N/A set colnames N/A unmatched N/A list unmatched N/A N/A N/A len unmatched 0 N/A N/A N/A N/A warnings warn N/A %s in data frame but not in summaries or values. N/A N/A ,  join N/A N/A '%s' x N/A x unmatched N/A ix N/A range num_points N/A fexog N/A N/A pd DataFrame index ix columns colnames N/A N/A d x N/A zip dtypes colnames N/A N/A N/A fexog N/A x N/A N/A pd Series index ix dtype d N/A pctls N/A N/A N/A N/A np linspace 0 100 num_points tolist N/A fvals N/A N/A np percentile N/A exog N/A focus_var pctls N/A fvals N/A N/A np asarray fvals N/A N/A N/A fexog loc N/A N/A N/A focus_var fvals N/A ky N/A N/A summaries keys N/A N/A N/A N/A fexog loc N/A N/A N/A ky N/A N/A summaries N/A ky N/A N/A exog loc N/A N/A N/A ky N/A ky N/A N/A values keys N/A N/A N/A N/A fexog loc N/A N/A N/A ky N/A values N/A ky N/A dexog N/A N/A patsy dmatrix N/A N/A N/A model data design_info builder fexog return_type dataframe N/A N/A dexog fexog fvals N/A _make_exog_from_arrays N/A N/A result focus_var summaries values num_points N/A N/A N/A 
    Create dataframes for exploring a fitted model as a function of one variable.

    This works for models fit without a formula.

    Returns
    -------
    exog : data frame
        A data frame in which the focus variable varies and the other variables
        are fixed at specified or computed values.
     N/A model N/A result model N/A model_exog N/A model exog N/A exog_names N/A model exog_names N/A N/A summaries None N/A N/A summaries N/A N/A N/A values None N/A N/A values N/A N/A exog N/A N/A np zeros N/A num_points N/A N/A model_exog shape N/A 1 N/A colnames N/A N/A N/A list N/A N/A values keys N/A list N/A N/A summaries keys N/A focus_var N/A unmatched N/A N/A set exog_names N/A set colnames N/A unmatched N/A list unmatched N/A N/A N/A len unmatched 0 N/A N/A N/A N/A warnings warn N/A %s in model but not in `summaries` or `values`. N/A N/A ,  join N/A N/A '%s' x N/A x unmatched N/A pctls N/A N/A N/A N/A np linspace 0 100 num_points tolist N/A ix N/A N/A exog_names index focus_var N/A fvals N/A N/A np percentile N/A model_exog N/A N/A N/A ix pctls N/A N/A exog N/A N/A N/A ix fvals N/A ky N/A N/A summaries keys N/A N/A ix N/A N/A exog_names index ky N/A N/A exog N/A N/A N/A ix N/A N/A summaries N/A ky N/A model_exog N/A N/A N/A ix N/A ky N/A N/A values keys N/A N/A ix N/A N/A exog_names index ky N/A N/A exog N/A N/A N/A ix N/A values N/A ky N/A N/A exog fvals N/A _make_exog N/A N/A result focus_var summaries values num_points N/A N/A N/A N/A hasattr N/A N/A result model data frame N/A N/A N/A dexog fexog fvals N/A _make_exog_from_formula result focus_var summaries values num_points N/A N/A N/A exog fvals N/A _make_exog_from_arrays result focus_var summaries values num_points N/A N/A dexog fexog N/A exog exog N/A N/A dexog fexog fvals N/A _check_args N/A N/A values summaries values2 summaries2 N/A N/A N/A N/A values None N/A N/A values N/A N/A N/A values2 None N/A N/A values2 N/A N/A N/A summaries None N/A N/A summaries N/A N/A N/A summaries2 None N/A N/A summaries2 N/A N/A N/A s v N/A N/A summaries values N/A summaries2 values2 N/A N/A ky N/A N/A set N/A N/A v keys N/A set N/A N/A s keys N/A ky N/A list ky N/A N/A N/A len ky 0 N/A N/A N/A ValueError N/A One or more variable names are contained in both `summaries` and `values`: N/A N/A ,  join ky N/A N/A values summaries values2 summaries2 N/A predict_functional N/A N/A result focus_var summaries values summaries2 values2 alpha ci_method linear num_points exog exog2 N/A None None None None 0.05 pointwise True 10 None None kwargs N/A N/A N/A ci_method N/A pointwise scheffe simultaneous N/A N/A N/A ValueError confidence band method must be one of `pointwise`, `scheffe`, and `simultaneous`. N/A contrast N/A N/A values2 None N/A summaries2 None N/A N/A contrast N/A linear N/A N/A N/A ValueError `linear` must be True for computing contrasts N/A model N/A result model N/A N/A exog None N/A N/A N/A any N/A N/A x None N/A x N/A summaries summaries2 values values2 N/A N/A N/A ValueError if `exog` is provided then do not provide `summaries` or `values` N/A fexog exog N/A dexog N/A N/A patsy dmatrix N/A N/A N/A model data design_info builder fexog return_type dataframe N/A fvals N/A exog N/A focus_var N/A N/A exog2 None N/A N/A fexog2 exog N/A dexog2 N/A N/A patsy dmatrix N/A N/A N/A model data design_info builder fexog2 return_type dataframe N/A fvals2 fvals N/A N/A N/A values summaries values2 summaries2 N/A _check_args values summaries values2 summaries2 N/A N/A dexog fexog fvals N/A _make_exog result focus_var summaries values num_points N/A N/A N/A N/A len summaries2 N/A len values2 0 N/A N/A N/A dexog2 fexog2 fvals2 N/A _make_exog result focus_var summaries2 values2 num_points statsmodels.genmod.generalized_linear_model GLM statsmodels.genmod.generalized_estimating_equations GEE N/A N/A isinstance N/A result model N/A GLM GEE N/A N/A kwargs_pred N/A N/A kwargs copy N/A N/A N/A kwargs_pred update N/A linear True N/A N/A kwargs_pred kwargs N/A pred N/A N/A result predict exog fexog kwargs_pred N/A contrast N/A N/A pred2 N/A N/A result predict exog fexog2 kwargs_pred N/A pred N/A pred pred2 N/A dexog N/A dexog dexog2 N/A N/A ci_method pointwise N/A N/A t_test N/A N/A result t_test dexog N/A cb N/A N/A t_test conf_int alpha alpha N/A N/A N/A ci_method scheffe N/A N/A t_test N/A N/A result t_test dexog N/A sd N/A t_test sd N/A cb N/A N/A np zeros N/A num_points 2 scipy.stats.distributions f fdist N/A df1 N/A N/A N/A N/A result model exog shape N/A 1 N/A df2 N/A N/A N/A N/A N/A result model exog shape N/A 0 df1 N/A qf N/A N/A fdist cdf N/A 1 alpha df1 df2 N/A fx N/A sd N/A N/A np sqrt N/A df1 qf N/A N/A cb N/A N/A N/A 0 N/A pred fx N/A N/A cb N/A N/A N/A 1 N/A pred fx N/A N/A N/A ci_method simultaneous N/A N/A N/A sigma c N/A _glm_basic_scr result dexog alpha N/A cb N/A N/A np zeros N/A N/A N/A dexog shape N/A 0 2 N/A N/A cb N/A N/A N/A 0 N/A pred N/A c sigma N/A N/A cb N/A N/A N/A 1 N/A pred N/A c sigma N/A N/A linear N/A N/A link N/A N/A result family link N/A pred N/A N/A link inverse pred N/A cb N/A N/A link inverse cb N/A N/A pred cb fvals N/A N/A N/A predict_functional __doc__ _predict_functional_doc _glm_basic_scr N/A N/A result exog alpha N/A N/A N/A 
    The basic SCR from (Sun et al. Annals of Statistics 2000).

    Computes simultaneous confidence regions (SCR).

    Parameters
    ----------
    result : results instance
        The fitted GLM results instance
    exog : array-like
        The exog values spanning the interval
    alpha : float
        `1 - alpha` is the coverage probability.

    Returns
    -------
    An array with two columns, containing the lower and upper
    confidence bounds, respectively.

    Notes
    -----
    The rows of `exog` should be a sequence of covariate values
    obtained by taking one 'free variable' x and varying it over an
    interval.  The matrix `exog` is thus the basis functions and any
    other covariates evaluated as x varies.
     N/A model N/A result model N/A n N/A N/A N/A model exog shape N/A 0 N/A cov N/A N/A result cov_params N/A hess N/A N/A N/A np linalg inv cov N/A A N/A hess n N/A B N/A N/A N/A N/A np linalg cholesky A T N/A sigma2 N/A N/A N/A N/A N/A np dot exog cov exog sum 1 N/A sigma N/A N/A np sqrt sigma2 N/A bz N/A N/A N/A N/A np linalg solve N/A B T N/A exog T T N/A bz N/A N/A np sqrt n N/A bz N/A sigma N/A N/A N/A None N/A bzd N/A N/A np diff bz 1 axis 0 N/A bzdn N/A N/A N/A bzd 2 sum 1 N/A kappa_0 N/A N/A N/A N/A np sqrt bzdn sum scipy.stats.distributions norm func N/A N/A c N/A N/A N/A N/A N/A N/A N/A kappa_0 N/A N/A np exp N/A N/A N/A c 2 2 N/A np pi N/A 2 N/A 1 N/A N/A norm cdf c alpha N/A scipy.optimize brentq N/A N/A c rslt N/A brentq func 1 10 full_output True N/A N/A N/A rslt converged False N/A N/A N/A ValueError Root finding error in basic SCR N/A N/A sigma c N/A