Learn R Programming

dominanceanalysis (version 2.0.0)

da.lm.fit: Provides coefficient of determination for lm models.

Description

Uses \(R^2\) (coefficient of determination) as fit index

Usage

da.lm.fit(original.model, newdata = NULL, ...)

Arguments

original.model

Original fitted model

newdata

Data used in update statement

...

ignored

Value

A function described by using-fit-indices description for interface

See Also

Other fit indices: da.betareg.fit(), da.dynlm.fit(), da.glm.fit(), da.lmWithCov.fit(), da.lmerMod.fit(), da.mlmWithCov.fit()

Examples

Run this code
# NOT RUN {
x1<-rnorm(1000)
x2<-rnorm(1000)
y <-x1+x2+rnorm(1000)
df.1=data.frame(y=y,x1=x1,x2=x2)
lm.1<-lm(y~x1+x2)
da.lm.fit(lm.1)("names")
da.lm.fit(lm.1)(y~x1)
# }

Run the code above in your browser using DataLab