Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

boot_lme

Bootstraping for linear mixed models


Description

Bootstraping tools for linear mixed-models using a consistent interface

Usage

boot_lme(object, f = NULL, R = 999, psim = 1, cores = 1L, ...)

Arguments

object

object of class lme or gls

f

function to be applied (and bootstrapped), default coef (gls) or fixef (lme)

R

number of bootstrap samples, default 999

psim

simulation level for vector of fixed parameters either for simulate_gls or simulate_lme

cores

number of cores to use for parallel computation

...

additional arguments to be passed to function boot

Details

This function is inspired by Boot, which does not seem to work with ‘gls’ or ‘lme’ objects. This function makes multiple copies of the original data, so it can be very hungry in terms of memory use, but I do not believe this to be a big problem given the models we typically fit.

Examples

require(nlme)
require(car)
data(Orange)

fm1 <- lme(circumference ~ age, random = ~ 1 | Tree, data = Orange)
fm1.bt <- boot_lme(fm1, R = 50)

hist(fm1.bt)

nlraa

Nonlinear Regression for Agricultural Applications

v0.89
GPL-3
Authors
Fernando Miguez [aut, cre] (<https://orcid.org/0000-0002-4627-8329>), José Pinheiro [ctb, cph] (author of nlme::nlsList, nlme::predict.gnls, nlme::predict.nlme), Douglas Bates [ctb, cph] (author of nlme::nlsList, nlme::predict.gnls, nlme::predict.nlme), R-core [ctb, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.