View source: R/08_comparison.R
anova.modeler | R Documentation |
modeler
objectsPerform an extra sum-of-squares F-test to compare two nested
models of class modeler
. This test assesses whether the additional
parameters in the full model significantly improve the fit compared to the
reduced model.
## S3 method for class 'modeler'
anova(object, full_model = NULL, ...)
object |
An object of class |
full_model |
An optional object of class |
... |
Additional parameters for future functionality. |
A tibble
containing columns with the F-statistic and
corresponding p-values, indicating whether the full model provides a
significantly better fit than the reduced model.
Johan Aparicio [aut]
library(flexFitR)
dt <- data.frame(X = 1:6, Y = c(12, 16, 44, 50, 95, 100))
mo_1 <- modeler(dt, X, Y, fn = "fn_lin", param = c(m = 10, b = -5))
plot(mo_1)
mo_2 <- modeler(dt, X, Y, fn = "fn_quad", param = c(a = 1, b = 10, c = 5))
plot(mo_2)
anova(mo_1, mo_2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.