Skip to content

Commit

Permalink
Tweaks #496, #497 + static offset repair
Browse files Browse the repository at this point in the history
  • Loading branch information
rvlenth committed Jul 6, 2024
1 parent ce2cddf commit af54337
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: emmeans
Type: Package
Title: Estimated Marginal Means, aka Least-Squares Means
Version: 1.10.3
Date: 2024-07-01
Title: Estimated Margin2l Means, aka Least-Squares Means
Version: 1.10.3-090002
Date: 2024-07-06
Authors@R: c(person("Russell V.", "Lenth", role = c("aut", "cre", "cph"),
email = "russell-lenth@uiowa.edu"),
person("Ben", "Bolker", role = "ctb"),
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
title: "NEWS for the emmeans package"
---

## emmeans 1.10.3-090xxxx
* Refinements in tracking static offsets
* Made d.f. consistent for `geeglm` and `glmgee` (#496)
* Fixed suggestion for installing from GitHub (#497)


## emmeans 1.10.3
* Updated `mice::mira` support to use Barnard-Rubin adjusted d.f. (#494)
* Fix to MuMIn support so a response transformation is auto-detected
Expand Down
4 changes: 2 additions & 2 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,8 @@ emm_basis.geeglm = function(object, trms, xlev, grid, vcov.method = "vbeta", ...

misc = .std.link.labels(object$family, list())
misc$initMesg = attr(V, "methMesg")
dffun = function(k, dfargs) Inf
dfargs = list()
dffun = function(k, dfargs) dfargs$df
dfargs = list(df = df.residual(object))
list(X=X, bhat=bhat, nbasis=nbasis, V=V, dffun=dffun, dfargs=dfargs, misc=misc)
}

Expand Down
10 changes: 6 additions & 4 deletions R/ref-grid.R
Original file line number Diff line number Diff line change
Expand Up @@ -821,20 +821,22 @@ ref_grid <- function(object, at, cov.reduce = mean, cov.keep = get_emm_option("c
if (!missing(offset)) { # For safety, we always treat it as scalar
if (offset[1] != 0)
oval = offset[1]
if(".static.offset." %in% names(grid))
grid$.static.offset. = ref.levels$.static.offset. = oval
}
else {
if(".static.offset." %in% names(grid)) { # static offset is available
oval = om * grid[[".static.offset."]]
# grid$.static.offset. = NULL
}
#else
#else implied
if(!is.null(attr(trms,"offset"))) {
if (any(om != 0))
oval = om * (oval + .get.offset(trms, grid))
}
if(any(oval != 0))
grid[[".offset."]] = oval
}
if(any(oval != 0))
grid[[".offset."]] = oval


### --- Determine weights for each grid point
if (!hasName(data, "(weights)"))
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,10 @@ easily produce these results, as well as various graphs of them
package; then run

```r
remotes::install_github("rvlenth/emmeans", dependencies = TRUE, build_opts = "")

### To install without vignettes (faster):
remotes::install_github("rvlenth/emmeans")
remotes::install_github("rvlenth/emmeans", dependencies = TRUE, build_vignettes = TRUE)
```
Omitting the `build_vignettes` argument can save some time if you don't want the vignettes. They can always be found on the (emmeans pkgdown site)[https://rvlenth.github.io/emmeans/].

*Note:* If you are a Windows user, you should also first download and
install the latest version of
[`Rtools`](https://cran.r-project.org/bin/windows/Rtools/).
Expand Down

0 comments on commit af54337

Please sign in to comment.