简体   繁体   中英

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, eg:

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

I have the following error message:

unused argument (link = "identitylink")

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

There it´sa bit cryptic to read but it lists GLMs always ending with "ff", eg "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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM