Skip to content

lme4

Linear Mixed-Effects Models using 'Eigen' and S4

v2.0-1 · Mar 5, 2026 · GPL (>= 2)

Description

Fit linear and generalized linear mixed-effects models. The models and their components are represented using S4 classes and methods. The core computational algorithms are implemented using the 'Eigen' C++ library for numerical linear algebra and 'RcppEigen' "glue".

Downloads

719.1K

Last 30 days

87th

1.8M

Last 90 days

6.3M

Last year

Trend: +29% (30d vs prior 30d)

CRAN Check Status

2 ERROR
8 NOTE
4 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang NOTE
r-devel-linux-x86_64-debian-gcc NOTE
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 NOTE
r-devel-windows-x86_64 NOTE
r-oldrel-macos-arm64 NOTE
r-oldrel-macos-x86_64 NOTE
r-oldrel-windows-x86_64 NOTE
r-patched-linux-x86_64 NOTE
r-release-linux-x86_64 ERROR
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 ERROR
Check details (10 non-OK)
NOTE r-devel-linux-x86_64-debian-clang

compiled code

File ‘lme4/libs/lme4.so’:
  Found non-API call to R: ‘R_UnboundValue’

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.
NOTE r-devel-linux-x86_64-debian-gcc

compiled code

File ‘lme4/libs/lme4.so’:
  Found non-API call to R: ‘R_UnboundValue’

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.
NOTE r-devel-macos-arm64

re-building of vignette outputs

Note: skipping ‘lmer.Rnw’ due to unavailable dependencies: 'ggplot2'
NOTE r-devel-windows-x86_64

compiled code

File 'lme4/libs/x64/lme4.dll':
  Found non-API call to R: 'R_UnboundValue'

Compiled code should not call non-API entry points in R.

See 'Writing portable packages' in the 'Writing R Extensions' manual,
and section 'Moving into C API compliance' for issues with the use of
non-API entry points.
NOTE r-oldrel-macos-arm64

installed package size

installed size is 27.8Mb
  sub-directories of 1Mb or more:
    R          1.7Mb
    doc        1.7Mb
    libs      22.0Mb
    testdata   1.4Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 28.2Mb
  sub-directories of 1Mb or more:
    R          1.7Mb
    doc        1.7Mb
    libs      22.5Mb
    testdata   1.4Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  6.9Mb
  sub-directories of 1Mb or more:
    R          1.6Mb
    doc        1.7Mb
    libs       1.3Mb
    testdata   1.4Mb
NOTE r-patched-linux-x86_64

compiled code

File ‘lme4/libs/lme4.so’:
  Found non-API call to R: ‘R_UnboundValue’

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.
ERROR r-release-linux-x86_64

tests

Running ‘AAAtest-all.R’ [146s/178s]
  Running ‘HSAURtrees.R’ [3s/3s]
  Running ‘REMLdev.R’ [3s/4s]
  Running ‘ST.R’ [3s/3s]
  Running ‘agridat_gotway.R’ [4s/5s]
  Running ‘bootMer.R’ [7s/16s]
  Running ‘boundary.R’ [17s/21s]
  Running ‘confint.R’ [5s/5s]
  Running ‘devCritFun.R’ [3s/3s]
  Running ‘drop.R’ [3s/5s]
  Running ‘drop1contrasts.R’ [3s/4s]
  Running ‘dynload.R’ [0s/0s]
  Running ‘elston.R’ [3s/4s]
  Running ‘evalCall.R’ [3s/4s]
  Running ‘extras.R’ [2s/3s]
  Running ‘falsezero_dorie.R’ [3s/3s]
  Running ‘fewlevels.R’ [0s/0s]
  Running ‘getME.R’ [3s/5s]
  Running ‘glmer-1.R’ [5s/6s]
  Running ‘glmerControlPass.R’ [5s/6s]
  Running ‘glmerWarn.R’ [4s/5s]
  Running ‘glmmExt.R’ [7s/9s]
  Running ‘glmmWeights.R’ [7s/10s]
  Running ‘hatvalues.R’ [3s/4s]
  Running ‘is.R’ [3s/4s]
  Running ‘lmList-tst.R’ [3s/4s]
  Running ‘lme4_nlme.R’ [3s/4s]
  Running ‘lmer-0.R’ [3s/4s]
  Running ‘lmer-1.R’ [3s/4s]
  Running ‘lmer-conv.R’ [3s/3s]
  Running ‘lmer2_ex.R’ [3s/3s]
  Running ‘methods.R’ 
...[truncated]...
rint(warnings()) # TODO? catch most of these by expect_warning(..)
  + } else {
  +     cat( "package 'testthat' not available, cannot run unit tests\n" )
  + }
  Saving _problems/test-resids-82.R
  [ FAIL 1 | WARN 0 | SKIP 7 | PASS 1766 ]
  
  ══ Skipped tests (7) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test-eval.R:2:1'
  • Skipping (1): 'test-covariance_nlmer.R:22:3'
  • empty test (3): , ,
  • getRversion() < "4.6.0" is TRUE (1): 'test-methods.R:899:3'
  • testLevel < 2 is TRUE (1): 'test-predict.R:689:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-resids.R:81:5'): weighted residuals ──────────────────────────
  Expected `head(weighted.residuals(gm1), 3)` to equal `structure(...)`.
  Differences:
  2/3 mismatches (average diff: 0.267)
  [2] -5.17 - -4.93 == -0.244
  [3] -5.65 - -5.35 == -0.291
  
  [ FAIL 1 | WARN 0 | SKIP 7 | PASS 1766 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-release-windows-x86_64

tests

Running 'AAAtest-all.R' [115s]
  Running 'HSAURtrees.R' [0s]
  Running 'REMLdev.R' [2s]
  Running 'ST.R' [2s]
  Running 'agridat_gotway.R' [0s]
  Running 'bootMer.R' [0s]
  Running 'boundary.R' [0s]
  Running 'confint.R' [2s]
  Running 'devCritFun.R' [0s]
  Running 'drop.R' [0s]
  Running 'drop1contrasts.R' [0s]
  Running 'dynload.R' [0s]
  Running 'elston.R' [0s]
  Running 'evalCall.R' [0s]
  Running 'extras.R' [2s]
  Running 'falsezero_dorie.R' [0s]
  Running 'fewlevels.R' [0s]
  Running 'getME.R' [0s]
  Running 'glmer-1.R' [2s]
  Running 'glmerControlPass.R' [0s]
  Running 'glmerWarn.R' [0s]
  Running 'glmmExt.R' [2s]
  Running 'glmmWeights.R' [0s]
  Running 'hatvalues.R' [0s]
  Running 'is.R' [0s]
  Running 'lmList-tst.R' [2s]
  Running 'lme4_nlme.R' [2s]
  Running 'lmer-0.R' [2s]
  Running 'lmer-1.R' [2s]
  Running 'lmer-conv.R' [2s]
  Running 'lmer2_ex.R' [2s]
  Running 'methods.R' [0s]
  Running 'minval.R' [2s]
  Running 'modFormula.R' [0s]
  Running 'nbinom.R' [0s]
  Running 'n
...[truncated]...
e by expect_warning(..)
  + } else {
  +     cat( "package 'testthat' not available, cannot run unit tests\n" )
  + }
  Saving _problems/test-resids-82.R
  [ FAIL 1 | WARN 0 | SKIP 8 | PASS 1763 ]
  
  ══ Skipped tests (8) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test-eval.R:2:1'
  • On Windows (1): 'test-methods.R:345:3'
  • Skipping (1): 'test-covariance_nlmer.R:22:3'
  • empty test (3): , ,
  • getRversion() < "4.6.0" is TRUE (1): 'test-methods.R:899:3'
  • testLevel < 2 is TRUE (1): 'test-predict.R:689:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-resids.R:81:5'): weighted residuals ──────────────────────────
  Expected `head(weighted.residuals(gm1), 3)` to equal `structure(...)`.
  Differences:
  2/3 mismatches (average diff: 0.267)
  [2] -5.17 - -4.93 == -0.244
  [3] -5.65 - -5.35 == -0.291
  
  [ FAIL 1 | WARN 0 | SKIP 8 | PASS 1763 ]
  Error:
  ! Test failures.
  Execution halted

Check History

ERROR 10 OK · 3 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 11, 2026
ERROR r-patched-linux-x86_64

tests

Running ‘AAAtest-all.R’ [146s/169s]
  Running ‘HSAURtrees.R’ [3s/4s]
  Running ‘REMLdev.R’ [3s/4s]
  Running ‘ST.R’ [3s/4s]
  Running ‘agridat_gotway.R’ [4s/5s]
  Running ‘bootMer.R’ [7s/17s]
  Running ‘boundary.R’ [18s/23s]
  Running ‘confint.R’ [5s
...[truncated]...
iduals(gm1), 3)` to equal `structure(...)`.
  Differences:
  2/3 mismatches (average diff: 0.267)
  [2] -5.17 - -4.93 == -0.244
  [3] -5.65 - -5.35 == -0.291
  
  [ FAIL 1 | WARN 0 | SKIP 7 | PASS 1766 ]
  Error:
  ! Test failures.
  Execution halted
NOTE r-oldrel-macos-arm64

installed package size

installed size is 27.8Mb
  sub-directories of 1Mb or more:
    R          1.7Mb
    doc        1.7Mb
    libs      22.0Mb
    testdata   1.4Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 28.2Mb
  sub-directories of 1Mb or more:
    R          1.7Mb
    doc        1.7Mb
    libs      22.5Mb
    testdata   1.4Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  6.9Mb
  sub-directories of 1Mb or more:
    R          1.6Mb
    doc        1.7Mb
    libs       1.3Mb
    testdata   1.4Mb
NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-oldrel-macos-arm64

installed package size

installed size is 27.8Mb
  sub-directories of 1Mb or more:
    R          1.7Mb
    doc        1.7Mb
    libs      22.0Mb
    testdata   1.4Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 28.2Mb
  sub-directories of 1Mb or more:
    R          1.7Mb
    doc        1.7Mb
    libs      22.5Mb
    testdata   1.4Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  6.9Mb
  sub-directories of 1Mb or more:
    R          1.6Mb
    doc        1.7Mb
    libs       1.3Mb
    testdata   1.4Mb

Reverse Dependencies (530)

imports

ALDEx3 ARTool AgroR AssumpSure BCClong BFpack BayesCACE BayesLN BayesSenMC BradleyTerry2 CMatching CR2 CRTspat CalibrationCurves CleaningValidation ComBatFamQC CompositeReliability DClusterm DHARMa EQUALSTATS EdSurvey EstimateBreed GLMMcosinor GLMpack GRAB GimmeMyStats HDANOVA IDmeasurer IMTest INLAjoint JWileymisc LEGIT LKT LSAmitR LongDat MAGNAMWAR MAIHDA MCM MDMA MECfda MF.beta4 MIGEE MLID MLMusingR MMeM MRStdCRT MRStdLCRT MariNET MedianaDesigner MethodCompare MiRKAT MixedPsy MultiSpline PBImisc PLmixed PStrata PSweight PUMP PheVis Phenotype PoolTestR PowRPriori REndo RLRsim RRreg RStanTVA RVAideMemoire Rcmdr RcmdrPlugin.TeachStat SBMTrees SIAmodules SRMERS ShinyItemAnalysis SignacX SimplyAgree SoyNAM SumcaVer1 Surrogate TcGSA VCA WeightedCluster ZLAvian abn achieveGap actuaRE agriReg agriutilities altmeta attrib bayesammi baystability beezdemand bin2norm blmeco boot.pval breakaway brokenstick buildmer car catalytic ceas cgam chngpt ciTools cito climatehealth climwin clinicalsignificance clintools clustTMB cobin compositeReliabilityInNestedDesigns confintROB conversim cpr crctStepdown ctlr cv cvms dataquieR daySupply designr diagmeta difR distfreereg doremi dplR dsBase eefAnalytics effects epr epts evolvability ez faraway fastFMM faux fence finalfit fishmethods fullfact galamm gammi geeasy geex gemR glm.predict glmm.hp glmmEP glmmSeq glmmTMB gorica grafify gvcR iSTAY ib iccbeta iccmult inferference intRvals inti isni jlmerclusterperm joineRML jomo jstable konfound lefko3 likelihoodR lmmprobe longitree longsurr manymodelr mecor mediation meta metadeconfoundR metamisc metan metaplus micemd misty mixedbiastest mixpower mlVAR mlmhelpr mlmoderator mlmpower mlmtools modnets mult.latent.reg multiDimBio multid multilevelTools multilevelmod multisite.accuracy multitool multpois mxnorm nadir netmediate pamm partR2 pastaPlot pcgen pcvr pdR pecanr peramo petersenlab phoenics phyr piecewiseSEM plgraphics plssem powerbydesign pprof projpred psc psfmi psme ptmixed pwlmm qape qbrms qra quest rADA raincin readyomics refund refund.shiny reghelper registr regplot repmod reproducer rewie rockchalk rpql rptR rqlm rr2 rsq rstanarm rtpcr saeczi samplr semEff siland simpowa skpr smicd spAbundance spOccupancy specr splithalf spsurvey squid stabiliser stability standardize statgenGxE statgenSTA steppedwedge stevemisc surrosurv svycoxme svylme swCRTdesign swaprinc tidyILD toscca trace trouBBlme4SolveR tukeytrend varTestnlme vglmer vibass warpMix weights welchADF

suggests

AIBias AICcmodavg ANOM AgreementInterval BGData BayesFactor DAAG DAGassist EgoCor Epi FBMS FRK HLMdiag HSAUR HSAUR2 HSAUR3 HelpersMG ICCbin ILSAstats INLAvaan KFAS LMMstar MARSS MESS MethComp MuMIn NHSRdatasets OlinkAnalyze OnAge OpenMx R2admb RESI RcmdrPlugin.NMBU RoBMA SARP.compo SASmixed ScottKnott SimSurvey SpaDES.core SynergyLMM ThinkingGrid TripleR TukeyC VizTest ZIBR agridat aod aods3 asympDiag autoReg bartCause bayesDiagnostics bayestestR bregr brms brolgar broom broom.helpers broom.mixed bruceR cardx catdata catregs clubSandwich cocoon codebook connected correlation corrselect ctsem datawizard dlnm doBy dominanceanalysis domir dsBaseClient dscore easyViz ecostats effectsize embed emmeans epimdr epimdr2 equatiomatic eyetrackingR finetune flexmix flextable futurize gamair ggResidpanel ggeffects gglm ggstatsplot glmmFEL glmmML glmmsel glmulti gmodels gratia gtsummary hamlet heritable hmclearn hnp huxtable injurytools insight interactions ipmr irtrees jmSurface jointest jtools kerasnip kyotil languageR latrend lava lavaSearch2 likelihoodAsy lmeInfo lmeresampler lmfor longmixr lucid lvmisc marginaleffects margins matrixset mbest metadat metafor metarep mice miceadds mitml mixlm mlpwr mlr3fda mlr3pipelines mmrm modelbased modelsummary mrIML mrap multcomp multilevelcoda ordinal pan papaja parameters pda performance permutes pez phia polypoly postHoc psych purge r2glmm rdss reformulas report reportRmd rfars rmcorr rollout rtables samplingDataCRT sandwich scicomptools sdmTMB see sense shinybrms simglm singcar sjPlot sjstats sjtable2df sleev slim spaMM stan4bart statlingua summata supernova tableone tidyLPA tidyfit tidystats tidytreatment tram tramME unvs.med valueprhr valytics visreg

Dependency Network

Dependencies Reverse dependencies Matrix MASS Rdpack boot lattice minqa (>= 1.1.15) nlme nloptr reformulas rlang CLME GLMMRR LMERConvenienceFunctions MDMR MEMSS MIIPW MixRF MultisiteMediation QualityMeasure SPCDAnalyze WeMix WebPower afex agRee arm +515 more reverse deps lme4

Version History

new 2.0-1 Mar 10, 2026
updated 2.0-1 ← 1.1-38 diff Mar 4, 2026
updated 1.1-38 ← 1.1-37 diff Dec 1, 2025
updated 1.1-37 ← 1.1-36 diff Mar 25, 2025
updated 1.1-36 ← 1.1-35.5 diff Jan 10, 2025
updated 1.1-35.5 ← 1.1-35.4 diff Jul 2, 2024
updated 1.1-35.4 ← 1.1-35.3 diff Jun 18, 2024
updated 1.1-35.3 ← 1.1-35.2 diff Apr 15, 2024
updated 1.1-35.2 ← 1.1-35.1 diff Mar 27, 2024
updated 1.1-35.1 ← 1.1-35 diff Nov 4, 2023
updated 1.1-35 ← 1.1-34 diff Nov 2, 2023
updated 1.1-34 ← 1.1-33 diff Jul 4, 2023
updated 1.1-33 ← 1.1-32 diff Apr 24, 2023
updated 1.1-32 ← 1.1-31 diff Mar 13, 2023
updated 1.1-31 ← 1.1-30 diff Oct 31, 2022
updated 1.1-30 ← 1.1-29 diff Jul 7, 2022
updated 1.1-29 ← 1.1-28 diff Apr 6, 2022
updated 1.1-28 ← 1.1-27.1 diff Feb 4, 2022
updated 1.1-27.1 ← 1.1-27 diff Jun 21, 2021
updated 1.1-27 ← 1.1-26 diff May 14, 2021