modelPerformance | R Documentation |
Generic function. Generally returns things like fit indices, absolute error metrics, tests of overall model significance.
modelPerformance(object, ...)
as.modelPerformance(x)
is.modelPerformance(x)
## S3 method for class 'lm'
modelPerformance(object, ...)
object |
A fitted model object. The class of the model determines which specific method is called. |
... |
Additional arguments passed to specific methods. |
x |
A object (e.g., list or a modelPerformance object) to test or attempt coercing to a modelPerformance object. |
For lm
class objects, return number of observations,
AIC, BIC, log likelihood, R2, overall model F test, and p-value.
A data.table
with results.
A list with a data.table
with the following elements:
A character string indicating the model type, here lm
The number of observations
Akaike Information Criterion
Bayesian Information Criterion
log likelihood
log likelihood degrees of freedom
Residual variability
in sample variance explained
Cohen's F2 effect size R2 / (1 - R2)
adjusted variance explained
F value for overall model significance test
numerator degrees of freedom for F test
denominator degrees of freedom for F test
p-value for overall model F test
modelPerformance(lm(mpg ~ qsec * hp, data = mtcars))
modelPerformance(lm(mpg ~ hp, data = mtcars))
## Not run:
modelPerformance(lm(mpg ~ 0 + hp, data = mtcars))
modelPerformance(lm(mpg ~ 1, data = mtcars))
modelPerformance(lm(mpg ~ 0, data = mtcars))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.