Learn R Programming

processR (version 0.2.7)

r2diff: Calculate difference of R2 and adjusted R2

Description

Calculate difference of R2 and adjusted R2

Usage

r2diff(fit, mode = 1, digits = 3)

Arguments

fit

An object of class lm

mode

Integer If 1, remove all interaction. If 2, remove variables one by one

digits

Integer indicating the number of decimal places

Examples

Run this code
fit=lm(mpg~wt*hp,data=mtcars)
r2diff(fit)
r2diff(fit,mode=2)

Run the code above in your browser using DataLab