View source: R/regression_models.R

Gamma regression with a log-link | R Documentation |

Gamma regression with a log-link.

```
gammareg(y, x, tol = 1e-07, maxiters = 100)
```

`y` |
The dependent variable, a numerical variable with non negative numbers. |

`x` |
A matrix or data.frame with the indendent variables. |

`tol` |
The tolerance value to terminate the Newton-Raphson algorithm. |

`maxiters` |
The maximum number of iterations that can take place in the regression. |

The gamma.reg fits a Gamma regression with a log-link. The gamma.con fits a Gamma regression with a log link with the intercept only ( glm(y ~ 1, Gamma(log) ) ).

A list including:

`iters` |
The number of iterations required by the newton-Raphson. |

`deviance` |
The deviance value. |

`phi` |
The dispersion parameter ( |

`be` |
The regression coefficient(s). |

Stefanos Fafalios and Michail Tsagris.

R implementation and documentation: Stefanos Fafalios stefanosfafalios@gmail.com and Michail Tsagris mtsagris@uoc.gr.

McCullagh, Peter, and John A. Nelder. Generalized linear models. CRC press, USA, 2nd edition, 1989.

` gammaregs, zigamma.mle `

```
## Not run:
y <- rgamma(100, 3, 4)
x <- matrix( rnorm(100 * 2), ncol = 2)
m1 <- glm(y ~ x, family = Gamma(log) )
m2 <- gammareg(y, x)
## End(Not run)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.