Spaces:
Running
Running
Delete auxiliar_functions.R
Browse files- auxiliar_functions.R +0 -21
auxiliar_functions.R
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
library(ggplot2)
|
2 |
-
|
3 |
-
dgamma_glm <- function(x, mu, phi) {
|
4 |
-
if (any(mu <= 0))
|
5 |
-
stop(paste("mu must be positive", "\n", ""))
|
6 |
-
if (any(phi <= 0))
|
7 |
-
stop(paste("phi must be positive", "\n", ""))
|
8 |
-
if (any(x < 0))
|
9 |
-
stop(paste("x must be positive", "\n", ""))
|
10 |
-
dgamma(x=x, shape=1/phi, scale=mu*phi)
|
11 |
-
}
|
12 |
-
|
13 |
-
dinvgaus_glm <- function(x, mu, phi) {
|
14 |
-
if (any(mu <= 0))
|
15 |
-
stop(paste("mu must be positive", "\n", ""))
|
16 |
-
if (any(phi <= 0))
|
17 |
-
stop(paste("phi must be positive", "\n", ""))
|
18 |
-
if (any(x < 0))
|
19 |
-
stop(paste("x must be positive", "\n", ""))
|
20 |
-
(2*pi*x^3*phi)^-0.5 * exp(-(x-mu)^2/(2*phi*x*mu^2))
|
21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|