# 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=c(.05,.25,.5,.75,.95))
Mcmc = list(R=5000)
# Analyze 5 quantiles using default prior
out = QRseq(Method="QRc", Data=Data, Mcmc=Mcmc)
# Create default quantile plot of first variable
QRplot(out, var=1)
# Create quantile plot of second variable with 90% credible interval
QRplot(out, var=2, credint=c(.05, .95),main="This is an example")Run the code above in your browser using DataLab