bootreg | R Documentation |
runs repeated regressions on bootstrap samples, testing coefficients via z-distribution using bootstrapped standard errors.
bootreg(data, model, method = lm, n = 1000)
data |
a data frame |
model |
a fitted lme or lm - model |
method |
a function to use for refitting |
n |
number of bootstrap samples |
Bootstrap regression results object (brr)
R base models x <- rnorm(100) m <- rnorm(100) y <- rnorm(100,0.4*x-0.6*m,2) model <- lm(y~m*x) brr <- bootreg(data.frame(x,m,y),model,lm) #mixed models x <- rnorm(50) m <- rnorm(50) y <- rnorm(50,x*m,2) g <- sample(1:10,50,TRUE) model <- lme4::lmer(y~m*x + (1|g)) brr <- bootreg(data.frame(x,m,y,g),model,lme4::lmer)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.