## The quantile regression model
data(data)
data = data$data_linear
g=data$g
y=data$y
e=data$e
fit1=pqrBayes(g,y,u=NULL,e,d = NULL,quant=0.5,spline=NULL,model="linear")
sparse=TRUE
select=pqrBayes.select(obj = fit1,sparse = sparse,model="linear")
## The quantile varying coefficient model
data(data)
data = data$data_varying
g=data$g
y=data$y
u=data$u
e=data$e
spline = list(kn=2,degree=2)
fit1=pqrBayes(g,y,u,e,d = NULL,quant=0.5,spline = spline,model="VC")
sparse=TRUE
select=pqrBayes.select(obj = fit1,sparse = sparse,model="VC")
select
# \donttest{
## non-sparse
sparse=FALSE
spline = list(kn=2,degree=2)
fit2=pqrBayes(g,y,u,e,d = NULL,quant=0.5,spline = spline,sparse = sparse,model="VC")
select=pqrBayes.select(obj=fit2,sparse=FALSE,model="VC")
select
# }
Run the code above in your browser using DataLab