In the estimate extraction functions (b0(), b1(), fVal(), PRE()), you can supply either the result of lm() or the formula and data to be passed to lm(). This is not possible with supernova() which only accepts the result of lm().
library(supernova)
b0(lm(mpg ~ NULL, data = mtcars)) == b0(mpg ~ NULL, mtcars)
#> [1] TRUE
supernova(mpg ~ NULL, mtcars)
#> Error in supernova(mpg ~ NULL, mtcars) : unused argument (mtcars)
It would be nice to have supernova() overloaded to allow this and improve consistency.
In the estimate extraction functions (
b0(),b1(),fVal(),PRE()), you can supply either the result oflm()or the formula and data to be passed tolm(). This is not possible withsupernova()which only accepts the result oflm().It would be nice to have
supernova()overloaded to allow this and improve consistency.