Usage
qreg_spline(X, Y = NULL, Y_low = NULL, Y_high = NULL,
status = NULL, knots_inter = c(0.1, 0.5, 0.9),
Pareto = TRUE,
varying_effect = NULL,
tau = seq(0.05, 0.95, 0.05),
burn = 10000, iters = 50000,
q_low = 0.01, q_high = 0.99,
sig_a = .1, sig_b = .1,
mu_var = 10^2, cbf_var = 10^3,
tail_mean = -1.2, tail_var = .4,
cbf_eps = 0.5, theta_eps = 0.5,
tuning_theta = 1, tuning_tail = rep(1, 2),
cred_low = 0.025, cred_high = 0.975,
seed = 1, verbose = TRUE)
Arguments
X
Matrix of predictors with the first column consisting of all ones and all other values between -1 and 1.
Y_low,Y_high
Vectors of endpoints for interval-censored values.
status
Censoring status taking values
0 if uncensored
1 if left-censored on the interval (-Inf,Y)
2 if right-censored on the interval (Y,Inf)
3 if censored on the interval (Y_low,Y_high).
knots_inter
An ordered sequence of numbers in (0,1) specifying knot locations.
Pareto
An indicator for whether Pareto or exponential tails are fit, corresponding to heavy and light tailed densities respectively.
Distributions that decay slowly in the tail (e.g. t-distribution) are better
varying_effect
If varying_effect = j, then only the covariates in the first j columns of X have different effects on different quantile levels.
tau
Vector of quantile levels for output.
burn
Number of MCMC samples to discard as burn-in.
iters
Number of MCMC samples to generate after the burn-in.
q_low
The quantile level below which the lower parametric tail is fit.
q_high
The quantile level above which the upper parametric tail is fit.
sig_a
The shape hyperparameter for the prior precision of the basis functions.
sig_b
The scale hyperparameter for the prior precision of the basis functions.
mu_var
The prior variance of the prior mean of the basis functions.
cbf_var
The prior variance of the constant basis functions.
tail_mean
The prior mean for the log of the shape parameters for Pareto tails.
Only used if Pareto = TRUE.
tail_var
The prior variance for the log of the shape parameters for Pareto tails.
Only used if Pareto = TRUE.
cbf_eps
A parameter in [.1,.5] indicating the degree of stochastic thinning for the location basis functions.
Lower is stronger.
theta_eps
A parameter in [.1,.5] indicating the degree of stochastic thinning for the other basis functions.
Lower is stronger.
tuning_theta
The initial candidate variance for the parameters updated by random walk Metropolis Hastings.
tuning_tail
The initial candidate variance for the tail parameters.
cred_low
The lower limit of the posterior credible intervals.
cred_high
The upper limit of the posterior credible intervals.
verbose
An indicator for outputting real-time MCMC updates.