# Simulate data from heteroskedastic regression
set.seed(66)
n <- 200
X <- runif(n=n,min=0,max=10)
X <- cbind(1,X)
y <- 1 + 2*X[,2] + rnorm(n=n, mean=0, sd=.6*X[,2])
# Initialize the inputs for QRc
Data = list(y=y, X=X, p=.5)
Mcmc = list(R=5000)
# Analyze 0.5 quantile using default prior
out = QRc(Data=Data, Mcmc=Mcmc)
# Return Bayes estimates and credible intervals
QRsummary(out, burnin=1000)
# Produce traceplots of every beta
# QRsummary(out, traceplot=TRUE)Run the code above in your browser using DataLab