README.md

drop1parallel

A parallel version of the drop1 (and stepAIC) function for R

Installation

library(devtools)
install_github("https://github.com/davedgd/drop1parallel")

Usage

library(lme4)
library(doParallel)
library(HSAUR3)
library(drop1parallel)

cl <- makePSOCKcluster(detectCores(logical = FALSE))
registerDoParallel(cl)

# basic example from ?lme4::glmer
gm2 <- glmer(outcome~ treatment + poly(visit, 2) +(1|patientID),
               data=toenail,
               family=binomial,nAGQ=20)

# for drop1, i.e., drop1(gm2):
drop1parallel(gm2, passData = toenail)

# for backwards stepwise AIC along the lines of MASS::stepAIC and others:
stepAICparallel(gm2, passData = toenail)

To-Do



davedgd/drop1parallel documentation built on Feb. 12, 2024, 5:36 p.m.