jlmer: Replacement for lmer function that uses Julia for fitting the...

View source: R/jlmer.R

jlmerR Documentation

Replacement for lmer function that uses Julia for fitting the model

Description

Replacement for lmer function that uses Julia for fitting the model

Usage

jlmer(formula = NULL, data = NULL, REML = TRUE, JULIA_HOME = NULL)

Arguments

formula

a two-sided linear formula object describing both the fixed-effects and random-effects part of the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right. Random-effects terms are distinguished by vertical bars (|) separating expressions for design matrices from grouping factors. Two vertical bars (||) can be used to specify multiple uncorrelated random effects for the same grouping variable.

data

a data frame containing the variables named in formula.

REML

logical scalar - Should the estimates be chosen to optimize the REML criterion (as opposed to the log-likelihood)?

JULIA_HOME

the location of the Julia installation on your machine. If NULL, JuliaCall::julia_setup will search for the location, but may not find it.

Details

The MixedModels package in Julia is extremely fast relative to lme4. Thus, this is a drop-in wrapper for lmer. It uses the JellyMe4 package in Julia to return an lmerMod object that can then be passed to all lme4-compatible helper functions, such as those in ggeffects or emmeans.

This function requires that MixedModels, RCall, and JellyMe4 all be installed in your Julia environment.

Value

An object of class merMod (more specifically, an object of subclass lmerMod), for which many methods are available (e.g. methods(class="merMod"))


PennStateDEPENdLab/dependlab documentation built on April 12, 2025, 11:03 p.m.