Skip to content

Commit

Permalink
Make r tweedie dispersion test more reproducible
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfryda committed Jan 18, 2024
1 parent ef9ecdd commit a535e92
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ library(tweedie)


generate_data <- function(tweedie_p, phi, offset) {
set.seed(12345)
molsp <- 1000
x <- seq(1, 10, 1)
yd <- exp(1 + 1.015 * x)
Expand Down Expand Up @@ -57,8 +58,11 @@ train_models <- function(simData, tweedie_p, phi) {
lambda = 0,
compute_p_values = T,
solver = "IRLSM",
calc_like = T
calc_like = T,
dispersion_epsilon = 1e-5,
seed = 12345
)
set.seed(12345)
rfit <-
glm(
yr ~ xt,
Expand Down

0 comments on commit a535e92

Please sign in to comment.