Learn R Programming

lqmm (version 1.04)

boot.lqmm: Bootstrapping Linear Quantile Mixed Models

Description

This function is used to obtain a bootstrap sample of a fitted LQMM.

Usage

boot.lqmm(object, R = 50, seed = round(runif(1, 1, 10000)), startQR = FALSE)

Arguments

object
an object of class "lqmm".
R
number of bootstrap replications.
seed
optional random number generator seed.
startQR
logical flag. If TRUE the estimated parameters in object are used as starting values in lqmm.fit applied to bootstrap samples. Otherwise starting values are based on lm.

Value

  • An object of class boot.lqmm is a data frame with R rows and npars columns containing the bootstrap estimates of theta_x, theta_z, and scale. If object contains results for multiple quantiles, boot.lqmm returns an array of dimension c(R,npars,nt), where nt is the length of tau. The elements of theta_z are labelled with reStruct. See function covHandling and the example below on how to derive the variance-covariance matrix of the random effects starting from theta_z. The following attributes are available:
  • tauindex of the quantile(s).
  • estimatedthe estimated parameter as given by object.
  • Rnumber of bootstrap replications.
  • seedthe random number generator seed used to produce the bootstrap sample.
  • nnlabels of the fixed effects.
  • nparstotal numer of parameters.
  • indicesthe bootstrap sample of independent data units.

References

Geraci M and Bottai M (2013). Linear quantile mixed models. Statistics and Computing, doi: 10.1007/s11222-013-9381-9.

See Also

lqmm, summary.lqmm, lqmmControl.

Examples

Run this code
## Orthodont data
data(Orthodont)

# Random intercept model
fit <- lqmm(distance ~ age, random = ~ 1, group = Subject,
	tau = 0.5, data = Orthodont)
fit.boot <- boot.lqmm(fit)

Run the code above in your browser using DataLab