11
$\begingroup$

I would like to find some solution for performing a mixed effect model of quantile regression.

From my google searching, I was not able to find an R implementation for such a procedure (only warnings that "this is not for the faint hearted").

I would like to solve a simple situation where we have one x one y, and one "subject" variable.

Any suggestions on what to do with this?

$\endgroup$
1
  • $\begingroup$ Can you include a specification of the model you're trying to fit? In a comment to Gavin's answer, you mention several covariates. What model structure are you seeking? $\endgroup$
    – Iterator
    Aug 6 '11 at 22:33
11
$\begingroup$

The extent to which one can answer your question depends on what sort of study you have in mind. Roger Koenker has done some work on quantile regression for longitudinal or panel data. Some details, a paper, and an early set of R code is available from Roger's website.

Do note the message on that webpage that it is now easier to do the methods discussed in the paper using qrss() in the quantreg package, shrinking fixed effects using the lasso penalty.

$\endgroup$
1
  • $\begingroup$ Hi Gavin. A study design: Let us say I have heights of kids and their parents - and I wish to estimate the 95 quantile of the kids height from the parents one. But the kids I have are also divided to kids from different countries, and I want countries to be a random effect. We might also want to account for gender and age, for example. Any further advice would be great. :) $\endgroup$
    – Tal Galili
    Aug 6 '11 at 11:37
16
$\begingroup$

Recently, the lqmm package "Linear Quantile Mixed Models" has been uploaded on CRAN. Although I have never used it, the lqmm package seems to do what you want.

This presentation from the useR! 2011 conference shows some examples of the package. Here is a description of the package taken from the useR! 2011 conference abstracts:

Conditional quantile regression (QR) pertains to the estimation of unknown quantiles of an outcome as a function of a set of covariates and a vector of fixed regression coefficients. In the last few years, the need for extending the capabilities of QR for independent data to deal with clustered sampling designs (e.g., repeated measures) has led to several and quite distinct approaches. Here, I consider the likelihood-based approach that hinges on the strict relationship between the weighted L₁ norm problem associated with a conditional QR model and the asymmetric Laplace distribution (Geraci and Bottai, 2007).

In this presentation, I will illustrate the use of the R package lqmm to perform QR with mixed (fixed and random) effects for a two-level nested model. The estimation of the fixed regression coefficients and of the random effects' covariance matrix is based on a combination of Gaussian quadrature approximations and optimization algorithms. The former include Gauss-Hermite and Gauss-Laguerre quadratures for, respectively, normal and double-exponential (i.e., symmetric Laplace) random effects; the latter include a modified compass search algorithm and general purpose optimizers (optim and optimize). Modelling and inferential issues are detailed in Geraci and Bottai (2011) (a preliminary draft is available upon request). The package also provides commands for the case of independent data.

$\endgroup$
1
  • $\begingroup$ I've recently used lqmm too, and it does exactly what the OP wants. +1 $\endgroup$
    – boscovich
    May 12 '12 at 22:13
3
$\begingroup$

I have uploaded to the CRAN a package called qrLMM available here

http://cran.r-project.org/web/packages/qrLMM/index.html

where it does exactly what you are looking for and also in a paper to be submitted soon, we proof that we obtain better estimates (lower bies and standard errors) in all scenarios than the package lqmm from Geraci(2014). I hope it will be useful for some future research.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.