statsmodels.genmod.generalized_estimating_equations.GEE.get_distribution¶
- GEE.get_distribution(params, scale=None, exog=None, exposure=None, offset=None, var_weights=1.0, n_trials=1.0)¶
Return a instance of the predictive distribution.
- Parameters:
- paramsnumpy:array_like
The model parameters.
- scalescalar
The scale parameter.
- exognumpy:array_like
The predictor variable matrix.
- offsetnumpy:array_like or
None Offset variable for predicted mean.
- exposurenumpy:array_like or
None Log(exposure) will be added to the linear prediction.
- var_weightsnumpy:array_like
1d array of variance (analytic) weights. The default is None.
- n_trials
int Number of trials for the binomial distribution. The default is 1 which corresponds to a Bernoulli random variable.
- Returns:
genInstance of a scipy frozen distribution based on estimated parameters. Use the
rvsmethod to generate random values.
Notes
Due to the behavior of
scipy.stats.distributions objects, the returned random number generator must be called withgen.rvs(n)wherenis the number of observations in the data set used to fit the model. If any other value is used forn, misleading results will be produced.