Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
drizopoulos committed Jun 17, 2024
1 parent 8d5b7b4 commit df2d6c2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Package: GLMMadaptive
Title: Generalized Linear Mixed Models using Adaptive Gaussian Quadrature
Version: 0.9-4
Version: 0.9-5
Authors@R: person("Dimitris", "Rizopoulos", email = "d.rizopoulos@erasmusmc.nl",
role = c("aut", "cre"), comment = c(ORCID = '0000-0001-9397-0900'))
Date: 2024-03-24
Date: 2024-06-17
Maintainer: Dimitris Rizopoulos <d.rizopoulos@erasmusmc.nl>
BugReports: https://github.com/drizopoulos/GLMMadaptive/issues
Description: Fits generalized linear mixed models for a single grouping factor under
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# GLMMadaptive 0.9.1

## Minor
* For hurdle log-normal models predictions are now calculated on the orginal outcome scale - not the log.
* For hurdle log-normal models predictions are now calculated on the original outcome scale - not the log.

# GLMMadaptive 0.9.0

Expand Down
2 changes: 1 addition & 1 deletion R/mixed_fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ mixed_fit <- function (y, X, Z, X_zi, Z_zi, id, offset, offset_zi, family,
mu.eta_fun, score_eta_fun, score_eta_zi_fun, score_phis_fun,
list_thetas, diag_D, penalized, pen_mu, pen_invSigma, pen_df,
i_contributions = TRUE, weights = weights)
names(GH$post_vars) <- rownames(GH$post_modes)
#names(GH$post_vars) <- rownames(GH$post_modes)
list(coefficients = betas, phis = if (has_phis) phis, D = D, gammas = gammas,
post_modes = GH$post_modes, post_vars = GH$post_vars,
logLik = logLik, logLik_contributions = logLik_contributions,
Expand Down
4 changes: 2 additions & 2 deletions R/mixed_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ mixed_model <- function (fixed, random, data, family, weights = NULL,
unique(c(all.vars(getID_Formula(random)),
if (!is.null(zi_random)) all.vars(getID_Formula(zi_random))))
data[groups] <- lapply(data[groups],
function (x) if (!is.factor(x)) factor(x) else x)
function (x) if (!is.factor(x)) factor(x, levels = unique(x)) else x)
data <- data[order(data[[groups[1L]]]), ]
# drop unused levels of factors
factors <- sapply(data, is.factor)
Expand Down Expand Up @@ -306,7 +306,7 @@ mixed_model <- function (fixed, random, data, family, weights = NULL,
out$id_name <- id_nam
out$offset <- offset
dimnames(out$post_modes) <- list(unique(id_orig[[1L]]), RE_nams)
names(out$post_vars) <- unique(id_orig)
names(out$post_vars) <- unique(id_orig[[1L]])
out$post_vars[] <- lapply(out$post_vars, function (v) {
dimnames(v) <- list(RE_nams, RE_nams)
v
Expand Down
4 changes: 2 additions & 2 deletions man/GLMMadaptive.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Gaussian quadrature rule.
\tabular{ll}{
Package: \tab GLMMadaptive\cr
Type: \tab Package\cr
Version: \tab 0.9-3\cr
Date: \tab 2024-03-21\cr
Version: \tab 0.9-5\cr
Date: \tab 2024-06-17\cr
License: \tab GPL (>=3)\cr
}

Expand Down

0 comments on commit df2d6c2

Please sign in to comment.