Skip to content

WeMix

4.0.3Package record

Weighted Mixed-Effects Models Using Multilevel Pseudo Maximum Likelihood Estimation

2packages dependsuggested by 3
10.4Kdownloads / year
85.6%test coverage
8/13flavors OK

Overview

About

Run mixed-effects models that include weights at every level. The WeMix package fits a weighted mixed model, also known as a multilevel, mixed, or hierarchical linear model (HLM). The weights could be inverse selection probabilities, such as those developed for an education survey where schools are sampled probabilistically, and then students inside of those schools are sampled probabilistically. Although mixed-effects models are already available in R, WeMix is unique in implementing methods for mixed models using weights at multiple levels. Both linear and logit models are supported. Models may have up to three levels. Random effects are estimated using the PIRLS algorithm from 'lme4pureR' (Walker and Bates (2013) https://github.com/lme4/lme4pureR).

Changes in 4.0.3

improvements

  • there is now a predict function.

BUG FIXES

  • the latest Matrix package (unclear what version caused the issue, maybe 1.6) caused a bug that is fixed by this version of WeMix.
  • the haven package doesn't always import data in formats the Matrix package recognizes. Columns that should be numeric are now cast as numeric before they are used, which may prevent this issue. Thanks to Emilie Franck for pointing this out.
  • the mix function documentation now notes that the coefficient standard errors are always cluster robust (CR-0) estimates. Thanks to Francis Huang for pointing out that it previously mentioned a non-existent argument.
  • the mix function nolonger fails if the lme4::lmer fit had a variable of exactly zero because bobyqa threw an error. Thanks fo Charles Blankenship for identifying this bug.

FUNCTION RETIREMENT

  • the functions getHessian2 and getJacobian are removed from the package because they are not used.

From inst/NEWS.Rd in the release

Install

Health

CRAN checks
5NOTE8OK
Check messages
NOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names:
  WeMix/tests/testthat/test-1-main.R (.Dim: 1, .Dimnames: 1)
  WeMix/tests/testthat/test-4-ECLS.R (.Dim: 1, .Dimnames: 1)
  WeMix/tests/testthat/test-5-TIMSS.R (.Dim: 1, .Dimnames: 1)
'.Dim' should be changed to 'dim'.
'.Dimnames' should be changed to 'dimnames'.

CRAN check page ↗

Slowest check: 5.7 min · r-oldrel-windows-x86_64
Status changes
  • NOTE8 OK, 5 NOTE2026-09-08
  • ERROR8 OK, 4 NOTE, 1 ERROR2026-09-07
  • NOTE8 OK, 5 NOTE2026-07-23
  • ERROR12 OK, 1 ERROR2026-07-07
  • OK12 OK2026-04-25
Show 1 earlier changeHide 1 earlier change
  • NOTE13 OK, 1 NOTE2026-03-10
Advisories

none known

Documentation

In release 4.0.3
READMENoVignettesYes · 2 · dynamicNEWSYes · mentions 4.0.3Citation fileNoWebsiteYes · pkgdown
Help pages
3includes a package overview page
Examples that run
0%2 never run
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
33%

Downloads

10.4K
CRAN downloads in the past year
Rank #3,483 · ~28/day · ~867/mo
Daily download trend is not available in this view yet.
1.2K30 days
3K90 days
10.4K1 year
Compare downloads with other packages →
Also on119 r2u4 autocran1.8K conda_forge103 c2d4u

Repository

11Stars
1Forks
2Open issues
0Open PRs
0Releases
43Commits
3Commit identities
License file reads as GPL-2.0 · 43 commits · Last activity 2024-10-24 · Default branch at 4.0.4, ahead of CRAN 4.0.3 (checked 2026-10-18)
Responsiveness
How these are sampled
PRs merged (all time)
not measured
Median days to close, 50 most recently updated closed issues
26
Median days to close, 50 most recently updated closed PRs
not measured

Stars over time

2025-09-03 · 112026-07-07 · 11
PracticesBeta

2 development-tooling and community-health practices detected across 1 family in the upstream repository

Checks run against github.com/american-institutes-for-research/wemix on 2026-10-18.

Docs source (2)
pkgdown

GitHub Pages site last deployed 2024-10-24

How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
11 external dependencies (excludes base and recommended)

Installing WeMix adds 10 packages (7 with compiled code, 12 MB of source tarballs). Heaviest: lme4 4.1 MB, nloptr 2.1 MB, Rcpp 1.8 MB.

Depends (2)
R >= 3.5.0lme4
Imports (5)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
2direct
1indirect
Imports 2
Suggested by 3
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (10)
Author, Maintainer since 3.1.1 (2019)
Author · added in 3.1.3
Author · added in 4.0.0
Contributor · added in 3.1.7
Copyright holder · added in 4.0.0
lme4pureR PIRLS function
Copyright holder · added in 4.0.0
lme4pureR PIRLS function
pdr · added in 3.1.7

Previously maintained by Claire Kelley (1.0.2 to 3.0.0).

Listed in earlier versions (4)
Show 4 peopleHide 4 people
Huade Huo.
no longer listed · 1.0.2 to 3.1.1
Christian Kjeldsen .
no longer listed · 3.1.3 to 3.1.6
Christian Kjeldsen
no longer listed · 3.1.7 to 4.0.0
Christian Christrup
no longer listed · 4.0.3
Releases (21)

Pick two releases to compare their code metrics.

Show 17 earlier eventsHide 17 earlier events
  • 3.1.6
    record
    2020-12-08 · diff ↗
  • 3.1.5
    record
    2020-09-09 · diff ↗
  • 3.1.4
    record
    2020-05-21 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 3.1.3
    record
    2020-01-09 · diff ↗
  • 3.1.1
    record
    2019-06-27 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 3.0.0
    record
    2019-03-30 · diff ↗ ·
    added 1 export
    waldTest
  • 2.2.1
    record
    2019-03-14 · diff ↗ ·
    added 1 export
    mix
  • unarchivedReturned to CRAN
    2019-03-13
  • 2.2.0
    record
    2019-03-13 · diff ↗ ·
    removed 2 exports
    calc_lin_lnl_quad_fast, mix
  • archivedRemoved from CRAN
    2019-03-05
    check problems were not corrected despite reminders
  • 2.1.0
    record
    2018-09-24 · diff ↗
  • 2.0.0
    record
    2018-08-14 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 1.0.2
    record
    2018-04-10
  • R
    R 3.4.0 released · 2017-04-21

Package metadata

First published
2018-04-10
Total releases
21 / 8 yrs
License
GPL-2 OSI
Minimum R
≥ 3.5.0
Download size
620 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("WeMix")
Bailey, P., Bates, D., Buehler, E., Huo, H., Kelley, C., Kjeldsen, C. C., Nguyen, T., Sikali, E., Walker, S., & Webb, B. (2023). WeMix: Weighted Mixed-Effects Models Using Multilevel Pseudo Maximum Likelihood Estimation (Version 4.0.3) [Computer software]. https://doi.org/10.32614/CRAN.package.WeMix

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for WeMix version 4.0.3 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy