Learn R Programming

lmtest (version 0.2-2)

hmctest: Harrison-McCabe-Test

Description

hmctest performs the Harrison-McCabe-Test against heteroskedasticity.

Usage

hmctest(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 'hmctest' is called from

Value

  • A list with class "htest" containing the following components:
  • statisticthe value of the test statistic.
  • p.valuenot yet implemented, NA.
  • methoda character string indicating what type of test was performed.
  • data.namea character string giving the name(s) of the data.

References

Kraemer, W., Sonnberger, H. (1986): The linear regression model under test

See Also

lm

Examples

Run this code
x <- c(1:30)
err <- c(rnorm(10,0,1), rnorm(20,0,10))
y <- x^2 + err
formular <- y ~ x
hmc <- hmctest(formular, 10)

Run the code above in your browser using DataLab