GLD.quantreg | R Documentation |
The GLD quantile regression can be: 1) Fixed intercept, allowing all other coefficients to vary, 2) Only intercept is allowed to vary and 3) All coefficients can vary. Minimisation is achieved numerically through least squares between the proportion of estimated GLD error distribution below zero versus the specified quantile for parametric approach. For non parametric approach, minimisation is achieved using a least squares approach to find a q-th quantile GLD line such that the percentage of observations below the line corresponds to the q-th quantile.
GLD.quantreg(q, fit.obj, intercept = "", slope = "", emp=FALSE)
q |
Specify the quantile (range 0 to 1) line |
fit.obj |
An object from |
intercept |
Can either be "fixed" or left blank, blank indicates this parameter is allowed to vary in quantile line estimation |
slope |
Can either be |
emp |
Can either be |
This is a wrapper function for fun.gld.all.vary
,
fun.gld.slope.fixed.int.vary
,
fun.gld.slope.vary.int.fixed
.
A matrix showing the estimated coefficients for the specified quantile
regression model, the objective function value and whether convergence is
reached in the optimisation process. A value of 0 indicates convergence is
reached. The convergence value is the same as the one from the optim
function.
Steve Su
Su (2015) "Flexible Parametric Quantile Regression Model" Statistics & Computing May 2015, Volume 25, Issue 3, pp 635-650
GLD.lm.full
,fun.plot.q
,
summaryGraphics.gld.lm
## Dummy example
## Create dataset
set.seed(10)
x<-rnorm(200,3,2)
y<-3*x+rnorm(200)
dat<-data.frame(y,x)
## Fit FKML GLD regression with 3 simulations
fit<-GLD.lm.full(y~x,data=dat,fun=fun.RMFMKL.ml.m,param="fkml",n.simu=3)
## Find median regression, use empirical method
med.fit<-GLD.quantreg(0.5,fit,slope="fixed",emp=TRUE)
## Not run:
## Extract the Engel dataset
library(quantreg)
data(engel)
## Fit GLD Regression along with simulations
engel.fit.all<-GLD.lm.full(foodexp~income,data=engel,
param="fmkl",fun=fun.RMFMKL.ml.m)
## Fit parametric GLD quantile regression from 0.1 to 0.9, with equal spacings
## between quantiles
result<-GLD.quantreg(seq(0.1,.9,length=9),engel.fit.all,intercept="fixed")
## Non parametric quantile regression
GLD.quantreg(seq(0.1,.9,length=9),engel.fit.all,intercept="fixed",emp=T)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.