| modelPerformance {JWileymisc} | R Documentation | 
Return Indices of Model Performance
Description
Generic function. Generally returns things like fit indices, absolute error metrics, tests of overall model significance.
Usage
modelPerformance(object, ...)
as.modelPerformance(x)
is.modelPerformance(x)
## S3 method for class 'lm'
modelPerformance(object, ...)
Arguments
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.  | 
Details
For lm class objects, return number of observations,
AIC, BIC, log likelihood, R2, overall model F test, and p-value.
Value
A data.table with results.
A list with a data.table with the following elements:
- Model
 A character string indicating the model type, here lm
- N_Obs
 The number of observations
- AIC
 Akaike Information Criterion
- BIC
 Bayesian Information Criterion
- LL
 log likelihood
- LLDF
 log likelihood degrees of freedom
- Sigma
 Residual variability
- R2
 in sample variance explained
- F2
 Cohen's F2 effect size R2 / (1 - R2)
- AdjR2
 adjusted variance explained
- F
 F value for overall model significance test
- FNumDF
 numerator degrees of freedom for F test
- FDenDF
 denominator degrees of freedom for F test
- P
 p-value for overall model F test
Examples
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)