| lqmm | R Documentation |
lqmm fits linear quantile mixed modelFunction using JAGS to estimate the linear quantile mixed model assuming asymmetric Laplace distribution for residual error.
lqmm( formFixed, formRandom, formGroup, data, tau, RE_ind = FALSE, n.chains = 3, n.iter = 10000, n.burnin = 5000, n.thin = 1, n.adapt = NULL, precision = 10, save_jagsUI = FALSE, parallel = FALSE )
formFixed |
formula for fixed part of longitudinal submodel with response variable |
formRandom |
formula for random part of longitudinal submodel without response variable |
formGroup |
formula specifying the cluster variable (e.g. = ~ subject) |
data |
dataset of observed variables |
tau |
the quantile(s) to be estimated. This must be a number between 0 and 1, otherwise the execution is stopped. If more than one quantile is specified, rounding off to the 4th decimal must give non–duplicated values of |
RE_ind |
Boolean denoting if the random effects are assumed independent ; default is |
n.chains |
the number of parallel chains for the model; default is 1. |
n.iter |
integer specifying the total number of iterations; default is 10000 |
n.burnin |
integer specifying how many of n.iter to discard as burn-in ; default is 5000 |
n.thin |
integer specifying the thinning of the chains; default is 1 |
n.adapt |
integer specifying the number of iterations to use for adaptation; default is NULL |
precision |
variance by default for vague prior distribution |
save_jagsUI |
If TRUE (by default), the output of jagsUI package is return by the function |
parallel |
see jagsUI::jags() function |
A BQt object is a list with the following elements:
meanlist of posterior mean for each parameter
medianlist of posterior median for each parameter
modeslist of posterior mode for each parameter
StErrlist of standard error for each parameter
StDevlist of standard deviation for each parameter
ICslist of the credibility interval at 0.95 for each parameters excepted for covariance parameters in covariance matrix of random effects. Otherwise, use save_jagsUI=TRUE to have the associated quantiles.
datadata included in argument
sims.listlist of the MCMC chains of the parameters and random effects
controllist of arguments giving details about the estimation
random_effectlist for each quantile including both posterior mean and posterior standard deviation of subject-specific random effects
out_jagsUIonly if save_jagsUI=TRUE in argument: list including posterior mean, median, quantiles (2.5
Moreover, this list also returns the MCMC draws, the Gelman and Rubin diagnostics (see output of jagsUI objects)
Antoine Barbieri
Marco Geraci and Matteo Bottai (2014). Linear quantile mixed models. Statistics and Computing, 24(3):461-479. doi: 10.1007/s11222-013-9381-9.
#---- Orthodont data from lqmm package
data("Orthodont", package = "lqmm")
#---- Fit regression model for the first quartile
lqmm_025 <- lqmm(formFixed = distance ~ age,
formRandom = ~ age,
formGroup = ~ Subject,
data = Orthodont,
tau = 0.25,
n.iter = 1000,
n.burnin = 500)
#---- Get the posterior means
lqmm_025$mean
#---- Summary of output
summary(lqmm_025)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.