Skip to content

Commit

Permalink
Merge pull request #14 from ssi-dk:telkamp7/issue13
Browse files Browse the repository at this point in the history
Wrap `phi` in `exp()`. Fixes #13
  • Loading branch information
telkamp7 committed Nov 29, 2023
2 parents a398607 + 8371a63 commit 5f1d2c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/aeddo.R
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ aeddo <- function(
ncol(reference_design_matrix)
)]
# ... and dispersion parameter, phi
phi <- optimized_param$par[length(optimized_param$par)]
phi <- exp(optimized_param$par[length(optimized_param$par)])

# Establish one-step ahead lambda using reference observation
lambda <- c(
Expand Down
2 changes: 1 addition & 1 deletion R/nll_poisson_gamma.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ nll_poisson_gamma <- function(
# Construct vector with fixed effects parameters
beta <- theta[1:n_parameters]
# ... and model parameters
phi <- theta[-(1:n_parameters)]
phi <- exp(theta[-(1:n_parameters)])

# Define the lambda parameter
lambda <- exp(design_matrix %*% beta - log(n))
Expand Down

0 comments on commit 5f1d2c9

Please sign in to comment.