When I use GLMs I can use the option family="Gamma"
for analysing data consisting of positive real numbers. Also package gbm
provides a large number of distributions to choose from, but there's none that matches the gamma distribution. Which distribution should I choose?
Solved – R: Which distribution to use with gbm for gamma distributed data
boostinggamma distributionr
Best Answer
The distribution
gamma
are available in bothgbm
(only for the github version https://github.com/gbm-developers/gbm , not in the CRAN version) andmboost
package.For the package
gbm
, simply specifydistribution = 'gamma'
in the parameters ofgbm
function.For the package
mboost
, use gamma distribution specifyingfamily = GammaReg()
in the options of the functionmboost
as shown in the toy example below :