statsmodels.genmod.generalized_estimating_equations.NominalGEE.predict

NominalGEE.predict(params, exog=None, exposure=None, offset=None, which='mean', linear=None)

返回设计矩阵的预测值

Parameters:
paramsarray_like

广义线性模型的参数/系数。

exogarray_like, optional

设计 / 外生数据。如果 exog 为 None,则使用模型的 exog。

exposurearray_like, optional

曝光时间值,仅可与对数链接函数一起使用。详情请参阅注释。

offsetarray_like, optional

偏移值。详情请参见注释。

which‘mean’, ‘linear’, ‘var’(optional)

要预测的统计量。默认是‘均值’。

  • ‘mean’ 返回因变量的条件期望 E(y | x),即线性预测器的模型链接函数的逆。

  • ‘linear’ 返回均值函数的线性预测器。

  • ‘var_unscaled’ 似然模型隐含的因变量的方差。 这不包括尺度或var_weights。

linearbool

The linear` keyword is deprecated and will be removed, use ``which 关键字代替。 如果为 True,则返回线性预测值。如果为 False 或 None, 则将返回由 which 指定的统计量。

Returns:
An array of fitted values

注释

此处提供的任何暴露偏移将优先于模型拟合中使用的暴露偏移。如果此处将exog作为参数传递,则拟合中的任何暴露偏移值都将被忽略。

曝光值必须严格为正。


Last update: Oct 16, 2024