#Using the Orthodontic distance growth data
library(nlme)
data(Orthodont)
attach(Orthodont)
y = distance #response
x = cbind(1,c(rep(0,64),rep(1,44)),age) #design matrix for fixed effects
z = cbind(1,age) #design matrix for random effects
nj = rep(4,27) #balanced
## Not run:
# QRLMM(y,x,z,nj,MaxIter=100) #a quick median regression
#
#
# #Fit a very quick regression for the three quartiles (Just for having an idea!)
# QRLMM(y,x,z,nj,p = c(0.25,0.50,0.75),MaxIter=50,M=10)
#
# #A full profile quantile regression (This might take some time)
# QRLMM(y,x,z,nj,p = seq(0.05,0.95,0.05),MaxIter=300,M=10)
#
# #A simple output example
# -------------------------------------------------
# Quantile Regression for Linear Mixed Model
# -------------------------------------------------
# Quantile = 0.75
# Subjects = 27 ; Observations = 108 ; Balanced = 4
# -----------
# Estimates
# -----------
# - Fixed effects
# Estimate Std. Error z value Pr(>|z|)
# beta 1 17.08405 0.53524 31.91831 0
# 19
# beta 2 2.15393 0.36929 5.83265 0
# beta 3 0.61882 0.05807 10.65643 0
# sigma = 0.38439
# Random effects Varcov matrix
# z1 z2
# z1 0.16106 -0.00887
# z2 -0.00887 0.02839
# ------------------------
# Model selection criteria
# ------------------------
# Loglik AIC BIC HQ
# Value -216.454 446.907 465.682 454.52
# -------
# Details
# -------
# Convergence reached? = FALSE
# Iterations = 300 / 300
# Criteria = 0.00381
# MC sample = 10
# Cut point = 0.25
# Processing time = 7.590584 mins
# ## End(Not run)
Run the code above in your browser using DataLab