QT | R Documentation |
This function performs the quasi-t test for the parameters that index linear regression models, considering models with unknown heteroscedasticity, where HC methods are used to estimate the covariance matrix.
QT(model, significance = 0.05, hc=4, h0=0, ...)
model |
Any object of class |
significance |
Significance level of the test. By default, the level of significance is |
hc |
Method HC that will be used to estimate the covariance structure. The argument |
h0 |
Constant used in the null hypothesis (default is |
... |
Additional arguments to be passed to the function |
Returns an object of class list
with the estimated covariance matrix.
Pedro Rafael Diniz Marinho <pedro.rafael.marinho@gmail.com>
Cribari-Neto, F. (2004). Asymptotic inference under heteroskedasticity of unknown form. Computational Statistics and Data Analysis, 45, 215-233.
library(hcci)
data(schools)
y = schools$Expenditure # dependent variable
x = schools$Income/10000 # regressor scaled by 10^4
model_1 = lm(y ~ x)
model_2 = lm(y ~ x+I(x^2))
QT(model_1, significance = 0.05, hc=4, h0=0)
QT(model_2, significance = 0.05, hc=4, h0=0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.