New answers tagged

0 votes

Reparameterization trick for the Dirichlet distribution

I believe that for $\alpha=k+\alpha'$ where $k \in \mathbb{N}$ and $0 \leq \alpha' < 1$, you can just sample $z \sim \mbox{Gamma}(\alpha,1)$ using $z = \sum_{i=1}^k (-\ln U_i) + z'$ where $U_i \sim ...
Ian Holmes's user avatar
0 votes
Accepted

Error: PIRLS loop resulted in NaN value in GLMM (glmer) model with Gamma distribution

One of the key assumptions of using linear regression techniques is that the modeled relationship is linear. Plotting your data it seems that at least for ...
Stefan's user avatar
  • 5,826
1 vote
Accepted

Simulate a distribution from a fitted beta-regression model for a density plot in R

See Cribari-Neto, F., & Zeileis, A. (2010). Beta regression in R. Journal of Statistical Software, 34(2), Article 1. https://doi.org/10.18637/jss.v034.i02 for formula and definition in ...
DrJerryTAO's user avatar
  • 1,325
3 votes
Accepted

How do I use something like predict.glm (in R) with a svyglm model and why don't my predictions match my data?

It defaults to predicting on "link" scale see (?survey:::predict.svyglm()), i.e. the prediction is of the logarithm of ...
Alex J's user avatar
  • 1,776
1 vote
Accepted

What metric should I use for a Regression model with a gamma distributed target?

Use the (negative) likelihood of the distribution as your loss function. You can also turn it into a pseudo r2 for easier interpretability ( and negative likelihood is a 1:1 relation to pseudo r2). I ...
Georg M. Goerg's user avatar
0 votes

How to prove NegativeBinomial(r,p) converges to Gamma(r,1) as p->0

I know this question, was asked and answered years ago, but I'm going to derive $Gamma(t;k,\lambda)$ from a limit of $NegBin(r;k,p)$ in a more general way for posterity's sake. Here $r$ denotes the ...
SSD's user avatar
  • 175
2 votes

Taking the limit of a Beta Distribution to yield the Gamma Distribution

Consider the integral over the Beta Distribution: $\int^1_0Beta(x;\alpha,\beta)dx = \int^1_0\frac{(\alpha + \beta -1)!}{(\alpha -1)!(\beta-1)!}x^{\alpha-1}(1-x)^{\beta-1}dx=1$ Transforming variables ...
SSD's user avatar
  • 175
5 votes
Accepted

Taking the limit of a Beta Distribution to yield the Gamma Distribution

Suppose $X\sim\operatorname{Beta}(\alpha,n).$ Consider the limit of the distribution of $nX$ as $n\to\infty.$ \begin{align} f_{nX}(x) = {} & \frac d{dx} \Pr(nX\le x) = \frac d{dx} \Pr\left( X\le\...
Michael Hardy's user avatar
4 votes
Accepted

How to calculate quantiles for a gamma distribution?

There are two Gamma incomplete functions: the regularized one and the non-regularized one. The Python function gammaincinv is the inverse of the regularized one, so ...
Stéphane Laurent's user avatar
1 vote
Accepted

In a GLM, how do the dimensions of the linear predictor and the range of the link function always align?

The issue is the exact definition of gamma regression. The hypothesis of gamma regression is derived from the gamma distribution with a redundant scale parameter $\alpha$ . What this means is that we ...
Sagnik Taraphdar's user avatar

Top 50 recent answers are included