model_stats: Return actual R² for any model type, e.g. classic LMs as well...

View source: R/r_squared.R View source: R/model_stats.R

model_statsR Documentation

Return actual R² for any model type, e.g. classic LMs as well as GAMs or Boosted Tree models.

Description

This function returns a calculation of the R² of your model based on the squared correlation between actual and predicted values. This is much more stable than the classic lm() function of S and R, which fails already when you delete the intercept.

Usage

model_stats(model = model1)

Arguments

model

Input data. Just name the model you want to have the R² calculated for. Defaults to maRketingscience's "model1".

Examples

model_stats(model)
model_stats()

benetheking/maRketingscience documentation built on May 17, 2022, 5:57 a.m.