GOFTest: Goodness-of-Fit Tests for Quantile Regression Models

View source: R/Qtools.R

GOFTestR Documentation

Goodness-of-Fit Tests for Quantile Regression Models

Description

This function calculates a goodness-of-fit test for quantile regression models.

Usage

GOFTest(object, type = "cusum", alpha = 0.05, B = 100, seed = NULL)

Arguments

object

an object of class "rq","rqs", "rqt", "rrq", or "rq.counts".

type

the type of the test. See details.

alpha

the significance level for the test. This argument is relevant for type = "cusum" only.

B

the number of Monte Carlo samples. This argument is relevant for type = "cusum" only.

seed

see for random numbers. This argument is relevant for type = "cusum" only.

Details

This function provides goodness-of-fit tests for quantile regression. Currently, there is only one method available (type = "cusum"), for a test based on the cusum process of the gradient vector (He and Zhu, 2013). The critical value at level alpha is obtained by resampling. Other methods will be implemented in future versions of the package.

Value

GOFTest returns an object of class GOFtest.

Author(s)

Marco Geraci

References

He XM, Zhu LX. A lack-of-fit test for quantile regression. Journal of the American Statistical Association (2003);98:1013-1022.

Examples


## Not run: 
data(barro, package = "quantreg")
fit <- quantreg::rq(y.net ~ lgdp2 + fse2 + gedy2 + Iy2 + gcony2, data = barro, tau = c(.1,.5,.9))
GOFTest(fit)

## End(Not run)


Qtools documentation built on Nov. 2, 2023, 6:11 p.m.