rq_tidiers {broom} | R Documentation |
These methods tidy the coefficients of a quantile regression model into a summary, augment the original data with information on the fitted values and residuals, and construct a glance of the model's statistics.
## S3 method for class 'rq' tidy(x, se.type = "rank", conf.int = TRUE, conf.level = 0.95, alpha = 1 - conf.level, ...) ## S3 method for class 'rqs' tidy(x, se.type = "rank", conf.int = TRUE, conf.level = 0.95, alpha = 1 - conf.level, ...) ## S3 method for class 'nlrq' tidy(x, conf.int = FALSE, conf.level = 0.95, ...) ## S3 method for class 'rq' glance(x, ...) ## S3 method for class 'nlrq' glance(x, ...) ## S3 method for class 'rq' augment(x, data = model.frame(x), newdata, ...) ## S3 method for class 'rqs' augment(x, data = model.frame(x), newdata, ...) ## S3 method for class 'nlrq' augment(x, data = NULL, newdata = NULL, ...)
x |
model object returned by |
se.type |
Type of standard errors to calculate; see |
conf.int |
boolean; should confidence intervals be calculated, ignored
if |
conf.level |
confidence level for intervals |
alpha |
confidence level when |
... |
other arguments passed on to |
data |
Original data, defaults to extracting it from the model |
newdata |
If provided, new data frame to use for predictions |
If se.type != "rank"
and conf.int = TRUE
confidence
intervals are calculated by summary.rq
. Otherwise they are standard t
based intervals.
This simply calls augment.nls
on the "nlrq" object.
All tidying methods return a data.frame without rownames, whose structure depends on the method chosen.
tidy.rq
returns a data frame with one row for each coefficient.
The columns depend upon the confidence interval method selected.
tidy.rqs
returns a data frame with one row for each coefficient at
each quantile that was estimated. The columns depend upon the confidence interval
method selected.
tidy.nlrq
returns one row for each coefficient in the model,
with five columns:
term |
The term in the nonlinear model being estimated and tested |
estimate |
The estimated coefficient |
std.error |
The standard error from the linear model |
statistic |
t-statistic |
p.value |
two-sided p-value |
glance.rq
returns one row for each quantile (tau)
with the columns:
tau |
quantile estimated |
logLik |
the data's log-likelihood under the model |
AIC |
the Akaike Information Criterion |
BIC |
the Bayesian Information Criterion |
df.residual |
residual degrees of freedom |
glance.rq
returns one row for each quantile (tau)
with the columns:
tau |
quantile estimated |
logLik |
the data's log-likelihood under the model |
AIC |
the Akaike Information Criterion |
BIC |
the Bayesian Information Criterion |
df.residual |
residual degrees of freedom |
augment.rq
returns a row for each original observation
with the following columns added:
.resid |
Residuals |
.fitted |
Fitted quantiles of the model |
.tau |
Quantile estimated |
Depending on the arguments passed on to predict.rq
via ...
a confidence interval is also calculated on the fitted values resulting in
columns:
.conf.low |
Lower confidence interval value |
.conf.high |
Upper confidence interval value |
See predict.rq
for details on additional arguments to specify
confidence intervals. predict.rq
does not provide confidence intervals
when newdata
is provided.
augment.rqs
returns a row for each original observation
and each estimated quantile (tau
) with the following columns added:
.resid |
Residuals |
.fitted |
Fitted quantiles of the model |
.tau |
Quantile estimated |
predict.rqs
does not return confidence interval estimates.
augment.rqs
returns a row for each original observation
with the following columns added:
.resid |
Residuals |
.fitted |
Fitted quantiles of the model |