View source: R/daFitFunctions.r
da.lm.fit | R Documentation |
lm
models.Uses R^2
(coefficient of determination) as fit index
da.lm.fit(original.model, newdata = NULL, ...)
original.model |
Original fitted model |
newdata |
Data used in update statement |
... |
ignored |
A function described by using-fit-indices description for interface.
You could retrieve r2
index.
Other fit indices:
da.betareg.fit()
,
da.clm.fit()
,
da.dynlm.fit()
,
da.glm.fit()
,
da.lmWithCov.fit()
,
da.lmerMod.fit()
,
da.mlmWithCov.fit()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.