FreddyHernandez commited on
Commit
2470ebc
·
verified ·
1 Parent(s): 8a31424

Upload 2 files

Browse files
Files changed (2) hide show
  1. www/auxiliar_functions.R +21 -0
  2. www/logo.png +0 -0
www/auxiliar_functions.R ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ }
www/logo.png ADDED