Didi86
Didi86

Reputation: 1

Link "identity" function to gamma distribution in VGAM package of R

I'm using the VGAM package to do a regression between two samples which are Gamma distributed. Is it possible to choose the identity function for the link? If yes, how?

I'm using these code line and it works:

fit <- vglm(Y ~ X , family = gammaR, trace = TRUE)

But when I try to change the link function it doesn't work, e.g.:

fit <- vglm(Y ˜ X, family = gammaR(link= "identitylink"), trace = TRUE)

I have the following error message:

unused argument (link = "identitylink")

Upvotes: 0

Views: 893

Answers (1)

Jens
Jens

Reputation: 2449

I was stuck similarly like you with the gamma distribution in VGAM. Luckily, I found a VGAM-Reference Card!

There it´s a bit cryptic to read but it lists GLMs always ending with "ff", e.g. "poissonff", "binomialff", but no "gammaff". However, it works! The solution for me was to use:

fit <- vglm(Y ˜ X, gammaff(link= "identitylink"))

To sum up: "gammaff" instead of gammaR should work.

Upvotes: 0

Related Questions