Learn R Programming

qrcm (version 3.1)

summary.iqr: Summary After Quantile Regression Coefficients Modeling

Description

Summary of an object of class “iqr”.

Usage

# S3 method for iqr
summary(object, p, cov = FALSE, ...)

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 \(b(p)\), the set of functions that describe how quantile regression coefficients vary with the order of the quantile. See ‘Examples’.

se

the estimated standard errors.

test.x

Wald test for the covariates. Each row of coefficients is tested for nullity.

test.p

Wald test for the building blocks of the quantile function. Each column of coefficients is tested for nullity.

obj.function

the minimized loss function (NULL if the data are censored or truncated).

call

the matched call.

Arguments

object

an object of class “iqr”, the result of a call to iqr.

p

an optional vector of quantiles.

cov

logical. If TRUE, the covariance matrix of \(\beta(p)\) is reported. Ignored if p is missing.

...

for future methods.

Author

Paolo Frumento paolo.frumento@unipi.it

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.

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

Run this code

# 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

Run the code above in your browser using DataLab