GeneralizedGammaLSS#
- class superglm.GeneralizedGammaLSS( )#
Bases:
MeanPredictor,LocationPredictor,ScalePredictor,ShapePredictorGeneralized gamma with natural parameters
(mean | location, scale, shape).Prentice’s
(mu, sigma, Q)law ony > 0:shape = 0is the log-normal,shape = 1the Weibull,shape = scalethe gamma. The default mean form putsE[Y]first under a log link, so its relativities multiply the mean; the location form puts the log-scale location first under an identity link and admits an infinite mean.- Parameters:
- parametrisation{“mean”, “location”}, default=”mean”
Choose
family.mean(...)for the conditional response mean orfamily.location(...)for Prentice’s log-scale location. Declarefamily.scale(...)andfamily.shape(...)in either form. Scale is Prentice’s sigma and shape is Q. Scale need not equal the standard deviation of the response or its logarithm.- scale_floorfloat, default=0.01
Nonnegative lower bound on scale. Its default link is
log(scale - scale_floor). Shape uses an identity link.
Notes
Changing the first parameter changes what its additive predictor describes. The mean form requires a finite response mean. Results contain
mean, scale, shapeorlocation, scale, shape.predictreturns the response mean in both forms, including infinity where the mean does not exist in the location form.- variance(
- theta: NDArray,
Population variance, with infinity for a divergent second moment.
- expected_shortfall(
- p: NDArray,
- theta: NDArray,
E[Y | Y > q_p]per row in either natural parametrisation.