Learn R Programming

lqmm (version 1.04)

boot.lqm: Bootstrapping Linear Quantile Models

Description

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

Usage

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

Arguments

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

Value

  • An object of class boot.lqm is a data frame with R rows and npars columns containing the bootstrap estimates of theta. If object contains results for multiple quantiles, boot.lqm returns an array of dimension c(R,npars,nt), where nt is the length of tau. 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.
  • nparstotal numer of parameters.
  • rdfthe number of residual degrees of freedom.
  • indicesthe bootstrap sample of independent data units.

See Also

lqm, summary.lqm, lqmControl.

Examples

Run this code
set.seed(123)
n <- 500
test <- data.frame(x = runif(n,0,1))
test$y <- 30 + test$x + rnorm(n)
fit.lqm <- lqm(y ~ x, data = test, tau = 0.5)
boot.lqm(fit.lqm)

Run the code above in your browser using DataLab