POLY_MODEL$test | R Documentation |
This function test the null model. In this class, the test is either a F-test computed using stats::anova or a RESET test computed using lmtest::resettest.
dat |
Data frame. A data frame containing all variables needed by the
|
null_formula |
Formula. Formula for fitting the null model. Default
is |
alt_formula |
Formula. Formula for fitting the alternative model. Only
used in F-test. Default is |
test |
Character. A string representing the test. Either "F" or "RESET". |
power |
Integer. A vector of integers representing the power of the variables that should be included. Only used in RESET test. Default is 2:3. |
power_type |
Character. Argument passed to lmtest::resettest. "fitted", "regressor" or "princomp". Only used in RESET test. Default is "fitted". |
A list containing the test name, the test statistic and the p-value.
# Instantiate
mod <- poly_model(shape = 2, sigma = 0.5)
mod
dat <- mod$gen(100000)
# F-test
mod$test(dat, test = "F")
# RESET test
mod$test(dat, test = "RESET", power = 2:4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.