This function test the null model.
In this class, the test is a BP-test computed using lmtest::bptest. The
variance formula is ~ x + I(x^2)
.
Arguments
- dat
Data frame. A data frame containing all variables needed by the
null_formula
.- null_formula
Formula. Formula for fitting the null model. Default is
null_formula = self$null_formula
.
Examples
# Instantiate
x <- rand_uniform()
e <- rand_normal()
test <- heter_model(a = 0, b = 100)
dat <- test$gen(100000)
test$test(dat)
#> $name
#> [1] "BP-test"
#>
#> $statistic
#> [1] 17777.63
#>
#> $p_value
#> [1] 0
#>