boot_lme | R Documentation |
Bootstraping tools for linear mixed-models using a consistent interface
bootstrap function for objects of class gls
boot_lme(
object,
f = NULL,
R = 999,
psim = 1,
cores = 1L,
data = NULL,
verbose = TRUE,
...
)
boot_gls(
object,
f = NULL,
R = 999,
psim = 1,
cores = 1L,
data = NULL,
verbose = TRUE,
...
)
object |
object of class |
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 |
cores |
number of cores to use for parallel computation |
data |
optional data argument (useful/needed when data are not in an available environment). |
verbose |
logical (default TRUE) whether to print a message if model does not converge. |
... |
additional arguments to be passed to function |
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.