GLM.get_distribution()

statsmodels.genmod.generalized_linear_model.GLM.get_distribution

GLM.get_distribution(params, scale=1, exog=None, exposure=None, offset=None) [source]

Returns a random number generator for the predictive distribution.

Parameters:

params : array-like

The model parameters.

scale : scalar

The scale parameter.

exog : array-like

The predictor variable matrix.

Returns a frozen random number generator object. Use the

``rvs`` method to generate random values.

Notes

Due to the behavior of scipy.stats.distributions objects, the returned random number generator must be called with gen.rvs(n) where n is the number of observations in the data set used to fit the model. If any other value is used for n, misleading results will be produced.

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.genmod.generalized_linear_model.GLM.get_distribution.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部