quantreg_spacing.Rd
Lower level function which calculates the quantile spacing regression coefficients
quantreg_spacing(
y,
X,
var_names,
alpha,
jstar,
algorithm = "rq.fit.sfn",
weights = NULL,
control = list(small = 1e-06, trunc = TRUE, start_list = NA, output_quantiles =
FALSE, calc_avg_me = FALSE, calc_r2 = T),
...
)
Column of response variable.
Regression specification matrix.
RHS regression variable names.
Quantiles to be estimated.
First quantile to be estimated (usually the center one)
The name of a function which will estimate a quantile regression.
Defaults to rq.fit.sfn_start_val. Must be a string, as it is passed to do.call
vector of optional weights
control parameters to pass to the control arguments of quantreg_spacing
,
the lower-level function called by qs
. This is set via the function qs_control
,
which returns a named list, with elements including:
trunc
: whether to truncate residual values below the argument "small"
small
: level of "small" values to guarentee numerical stability. If not specified, set dynamically based on the standard deviation of the outcome variable.
output_quantiles
: whether to save fitted quantiles as part of the function output
calc_avg_me
: whether to return average marginal effects as part of the fitted object
lambda
: the penalization factor to be passed to penalized regression algorithms
other parameters passed to the algorithm
Minimum size of residuals for computational accuracy.
Boolean value; if true, replace those dependent values less than small with small itself; else, only use rows with residuals greater than small
Starting values for regression optimization.
Returns a list of coefficients. num_betas is an x by p matrix of estimated parameters for each supplied quantiles. pseudo_r is a 1 by p matrix of psuedo R^2 values for each quantile estimate. warnings is a 1 by p matrix of warnings produced by each quantile regression call. iter: is a 1 by p matrix of iterations ran by each quantile regression call.