summary.iqr {qrcm} | R Documentation |
Summary After Quantile Regression Coefficients Modeling
Description
Summary of an object of class “iqr
”.
Usage
## S3 method for class 'iqr'
summary(object, p, cov = FALSE, ...)
Arguments
object |
an object of class “ |
p |
an optional vector of quantiles. |
cov |
logical. If TRUE, the covariance matrix of |
... |
for future methods. |
Details
If p is missing, a summary of the fitted model is reported. This includes the estimated coefficients, their standard errors, and other summaries (see ‘Value’). If p is supplied, the quantile regression coefficients of order p are extrapolated and summarized.
Value
If p is supplied, a standard summary of the estimated quantile regression coefficients is returned for each value of p. If cov = TRUE, the covariance matrix is also reported.
If p is missing (the default), a list with the following items:
converged |
logical value indicating the convergence status. |
n.it |
the number of iterations. |
n |
the number of observations. |
free.par |
the number of free parameters in the model. |
coefficients |
the matrix of estimated coefficients. Each row corresponds to
a covariate, while each column corresponds to an element of |
se |
the estimated standard errors. |
test.x |
Wald test for the covariates. Each row of |
test.p |
Wald test for the building blocks of the quantile function. Each column of |
obj.function |
the minimized loss function (NULL if the data are censored or truncated). |
call |
the matched call. |
Note
In version 1.0 of the package, a chi-squared goodness-of-fit test was provided.
The test appeared to be unreliable and has been removed from the subsequent versions. Use test.fit
.
Author(s)
Paolo Frumento paolo.frumento@unipi.it
See Also
iqr
, for model fitting; predict.iqr
and plot.iqr
,
for predicting and plotting objects of class “iqr
”. test.fit.iqr
for a goodness-of-fit test.
Examples
# using simulated data
set.seed(1234); n <- 1000
x1 <- rexp(n)
x2 <- runif(n)
qy <- function(p,x){qnorm(p)*(1 + x)}
# true quantile function: Q(p | x) = beta0(p) + beta1(p)*x, with
# beta0(p) = beta1(p) = qnorm(p)
y <- qy(runif(n), x1) # to generate y, plug uniform p in qy(p,x)
# note that x2 does not enter
model <- iqr(y ~ x1 + x2, formula.p = ~ I(qnorm(p)) + p + I(p^2))
# beta(p) is modeled by linear combinations of b(p) = (1, qnorm(p),p,p^2)
summary(model)
# interpretation:
# beta0(p) = model$coef[1,]*b(p)
# beta1(p) = model$coef[2,]*b(p); etc.
# x2 and (p, p^2) are not significant
summary(model, p = c(0.25, 0.75)) # summary of beta(p) at selected quantiles