summary.iqr: Summary After Quantile Regression Coefficients Modeling

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/iqr2_auxfun.R

Description

Summary of an object of class “iqr”.

Usage

1
2
## S3 method for class 'iqr'
summary(object, p, cov = FALSE, ...)

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 β(p) is reported. Ignored if p is missing.

...

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 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.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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

qrcm documentation built on Feb. 2, 2021, 9:07 a.m.