clusbootglm {ClusterBootstrap}R Documentation

Fit generalized linear models with the cluster bootstrap

Description

Fit a generalized linear model with the cluster bootstrap for analysis of clustered data.

Usage

clusbootglm(
  model,
  data,
  clusterid,
  family = gaussian,
  B = 5000,
  confint.level = 0.95,
  n.cores = 1
)

Arguments

model

generalized linear model to be fitted with the cluster bootstrap. This should either be a formula (or be able to be interpreted as one) or a glm / lm object. From the (g)lm objects, the formula will be used.

data

dataframe that contains the data.

clusterid

variable in data that identifies the clusters.

family

error distribution to be used in the model, e.g. gaussian or binomial.

B

number of bootstrap samples.

confint.level

level of confidence interval.

n.cores

number of CPU cores to be used.

Details

Some useful methods for the obtained clusbootglm class object are summary.clusbootglm, coef.clusbootglm, and clusbootsample.

Value

clusbootglm produces an object of class "clusbootglm", containing the following relevant components:

coefficients

A matrix of B rows, containing the parameter estimates for all bootstrap samples.

bootstrap.matrix

n*B matrix, of which each column represents a bootstrap sample; each value in a column represents a unit of subjectid.

lm.coefs

Parameter estimates from a single (generalized) linear model.

boot.coefs

Mean values of the paramater estimates, derived from the bootstrap coefficients.

boot.sds

Standard deviations of cluster bootstrap parameter estimates.

ci.level

User defined confidence interval level.

percentile.interval

Confidence interval based on percentiles, given the user defined confidence interval level.

parametric.interval

Confidence interval based on lm.coefs and column standard deviations of coefficients, given the user defined confidence interval level.

BCa.interval

Confidence interval based on percentiles with bias correction and acceleration, given the user defined confidence interval level.

samples.with.NA.coef

Cluster bootstrap sample numbers with at least one coefficient being NA.

failed.bootstrap.samples

For each of the coefficients, the number of failed bootstrap samples are given.

Author(s)

Mathijs Deen, Mark de Rooij

Examples

## Not run: 
data(opposites)
clusbootglm(SCORE~Time*COG,data=opposites,clusterid=Subject)
## End(Not run)

[Package ClusterBootstrap version 1.1.2 Index]