Questions tagged [gamma-distribution]

Anything related to the gamma probability distribution, i.e. a continuous probability distribution whose probability density function is connected to the "gamma function". DO NOT USE this tag for questions about the gamma function, use the [gamma-function] tag instead.

Anything related to the gamma probability distribution, i.e. a continuous probability distribution whose probability density function is connected to the gamma function.

If a variable X follows a gamma distribution with shape parameter k>0 and scale parameter θ, then it has probability density function:

enter image description here

It follows that E(X)=kθ and Var(X)=kθ². In some texts, the gamma distribution is parameterized instead by the rate parameter, which is the reciprocal of the scale parameter: β=1/θ.

DO NOT USE this tag for questions about the gamma function, use the tag instead.

See Wikipedia page on the gamma distribution.


Tag Usage

Questions on should be about implementation and programming problems, not about the statistical or theoretical properties of the technique. Consider whether your question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis.

219 questions
2
votes
3 answers

Still get non-positive values for the 'gamma' family

I am analyzing percentage data with glmer, and I have read that Gamma family should be suitable for this kind of data. I have checked my data and there are no values below 0, but I still get an error saying I have non-positive values. >…
Sisi
  • 51
  • 3
2
votes
1 answer

how to separate two distributions from a pdf(probability density function)?

Assume the pdf(probability density function) of my dataset is as below, there are two distributions in the dataset and I want to fit them with a Gamma and a Gaussian distribution. I have read this but this applies only for two Gaussian…
Nate
  • 59
  • 1
  • 5
2
votes
1 answer

Normal-gamma distribution in Python

Is there an implementation of the Normal-Gamma distribution for Python? I have looked over the internet, including scipy, and could not find it.
2
votes
0 answers

Obtaining distribution parameters from GLM

My question is part statistical and part coding. Say I have fitted a gamma log-link GLM. doc example # Instantiate a gamma family model with the default link function. gamma_model = sm.GLM(y, X, family=sm.families.Gamma()) gamma_results =…
BenP
  • 825
  • 1
  • 10
  • 30
2
votes
0 answers

Fitting data with glmer to a shifted Gamma distribution

I am analyzing the duration of discrete events that were detected in time-series data using a duration-threshold of 300 ms, i.e. the detected events can only be longer than 300 ms. When I had a look at my data I expected it to follow a shifted…
avaruus
  • 23
  • 3
2
votes
1 answer

PYMC3 Mixture model: help understanding multiple variables model

Let's say I have a dataframe with 4 variable. I want to see if I can generate a posterior of gamma mixtures over all the variables, with the goal to find clusters for each observation. I'm guessing I will need some sort of multivariate gamma…
2
votes
0 answers

Zero-Inflated GLM Gamma distribution in Python?

Software: I am using Python 3.7.3 and stats model library. Problem: I am trying to model a continuous target with zero inflated distribution (zeros are around 12,2% of the target variable). The target variable is annual income in US$. When i fit…
David Mora
  • 101
  • 1
  • 8
2
votes
1 answer

In R, what is the default link function using the glm function with the gamma family

I have implemented a model using the glm() function and specifiy the family distribution as gamma: glmer(FirstSteeringTime ~ error_rate + (1 + error_rate | pNum), family = Gamma, data = modellingdata) I know that you can apply link functions such…
codegoblin1996
  • 302
  • 2
  • 12
2
votes
1 answer

How do I plot points and the model's line with glm gamma link=log?

I used glm with Gamma distribution and link=log to create my regressions. I am trying to create the model's line with visreg, but it creates just for the response and it doesn't show the points. I want to create a graph with all my points and the…
2
votes
1 answer

How to overlay density histogram with gamma distribution fit in R?

I am new to R and would like to add a fit to a gamma distribution to my histogram. I would like the gamma distribution fit to overlay my histogram. I am able to calculate the gamma distribution with the dgamma function and also with the fitdist…
2
votes
0 answers

Scipy.stat.gamma.ppf returning inf value

I have a list of probabilities containing values between 0 and 1. When I tried to calculate the inverse of that using inverse of gamma function by scipy.stats.gamma.ppf but it returns inf value for value 1. can we get some meaningful results…
2
votes
0 answers

How do you find the coefficients of a Polynomail SVM in scikit-learn and what is the gamma?

coef_ : array, shape = [n_class * (n_class-1) / 2, n_features] Weights assigned to the features (coefficients in the primal problem). This is only available in the case of a linear kernel. coef_ is a readonly property derived from dual_coef_ and…
AturSams
  • 7,568
  • 18
  • 64
  • 98
2
votes
1 answer

Bayesian Gamma regression, what is the correct link function?

I'm trying to do a bayesian gamma regression with stan. I know the correct link function is the inverse canonical link, but if i dont use a log link parameters can be negative, and enter in a gamma distribution with a negative value, that obviously…
2
votes
0 answers

Is normalization (or scaling) useful for regression with Gradient Tree Boosting?

I read that normalization is not required when using gradient tree boosting (see e.g. Should I need to normalize (or scale) the data for Random forest (drf) or Gradient Boosting Machine (GBM) in H2O or in general?,…
kadee
  • 8,067
  • 1
  • 39
  • 31
2
votes
1 answer

R - Gamma Cumulative Distribution Function

I want to calculate the Gamma CDF for an array of data that I have. I have calculated the alpha and beta parameters, however I am not sure of how to calculate the CDF in R,(Is there something like Matlab's gamcdf?). I have seen some people use…
Ann M
  • 239
  • 2
  • 14
1 2
3
14 15