powered by
hctest(x, res)
#Example 1 #in this example, there is no hidden correlation set.seed(313477) n <- 50 err <- rnorm(n) x <- rnorm(n) y <- 1+2*x+err res <- resid(lm(y~x)) hctest(x, res)
Run the code above in your browser using DataLab