gqtest performs the Goldfeld-Quandt-Test against heteroskadasticity.
Given a known time T, the Goldfeld-Quandt tests the null-hypothesis:
variances at time 1..T and T..n are equal.
Usage
gqtest(formula, T, data=list())
Arguments
formula
a symbolic describtion for the model to be tested
T
split the model at time T
data
an optional data frame containing the variables in the model.
By default the variables are taken from the environment which 'gqtest' is
called from
Value
A list with class "htest" containing the following components:
statisticthe value of the test statistic.
p.valuethe p-value of the test.
methoda character string indicating what type of test was
performed.
data.namea character string giving the name(s) of the data.
Details
The test statistic under H0 follows a F distribution with df1 and df2 degree
of freedom.
References
Kraemer, W., Sonnberger, H. (1986): The linear regression model
under test
x <- c(1:30)
err <- c(rnorm(10,0,1), rnorm(20,0,10))
y <- x + err
formular <- y ~ x
gq <- gqtest(formular, 10)
qf(0.95, gq$parameter[1], gq$parameter[2])