Description Usage Arguments Value Author(s) Examples
This function is used to obtain a bootstrap sample of a fitted LQM or LQMM. It is a generic function.
1 |
object |
an object of |
R |
number of bootstrap replications. |
seed |
optional random number generator seed. |
startQR |
logical flag. If |
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.
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:
tau |
index of the quantile(s). |
estimated |
the estimated
parameter as given by |
R |
number of bootstrap replications. |
seed |
the random number generator seed used to produce the bootstrap sample. |
npars |
total numer of parameters. |
rdf |
the number of residual degrees of freedom. |
indices |
the bootstrap sample of independent data units. |
Marco Geraci
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # boot.lqm
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)
fit.boot <- boot(fit.lqm)
str(fit.boot)
# boot.lqmm
data(Orthodont)
fit <- lqmm(distance ~ age, random = ~ 1, group = Subject,
tau = 0.5, data = Orthodont)
fit.boot <- boot(fit)
str(fit.boot)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.