Learn R Programming

reformulas

reformulas (random effects formulas) is a utility package for processing "lme4-style" random effects formulas in R (i.e., formulas where the random effects are included in the form (f|g) as components of an overall model formula, where f represents a sub-formula for the varying effects and g represents a sub-formula for the grouping variable(s).

The package contains functions like findbars (extract terms containing |, i.e. random-effects terms), nobars (drop terms containing bars from a formula), etc.. The goal of reformulas is to be used upstream of lme4 and glmmTMB as a unified toolkit for processing formulas.

Copy Link

Version

Install

install.packages('reformulas')

Monthly Downloads

20,658

Version

0.2.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

March 13th, 2024

Functions in reformulas (0.2.0)

expandGrpVar

apply
no_specials

Drop 'specials' from a formula
expandDoubleVert

expand double-bar RE notation by splitting
anySpecial

Detect whether there are any 'specials' in a formula term
mkReTrms

Create list of structures needed for models with random effects
RHSForm

extract right-hand side of a formula
findReTrmClasses

list of specials -- taken from enum.R
sub_specials

Substitute safe chars (+) for specials (for use in model.frame) (Generalized from lme4's subbars function.)
splitForm

Split formula containing special random effect terms
nobars

Omit terms separated by vertical bars in a formula
subbars

"Substitute bars"