modresults | R Documentation |
Function to save the main statistics results froma fitted regression model.
modresults(mod = mod, print.output = FALSE, conf.lev = 0.95, eng = TRUE)
mod |
An object containing the fitted model by using
the |
print.output |
A logical option for printing, or displaying, the
saved outputs at the console. The default is set to TRUE, meanwhile if
|
conf.lev |
A numeric value (between 0.0001 and 0.9999) representing the confidence level to be used for some components of the output. The default value is 0.95. |
eng |
The language to be used in the output. English
is the default, meanwhile if |
The resulting object contains several outputs derived from a regression model.
This function returns a list having several components of a fitted regression model.
A somehow related version of this function was first created by Prof. Timothy Gregoire (Yale University), but the current version is due to Christian Salas-Eljatib.
Salas-Eljatib, C. 2021. Análisis de datos con el programa estadístico R: una introducción aplicada. Ediciones Universidad Mayor, Santiago, Chile. 170 p. https://eljatib.com/rlibro
library(datana)
df <- datana::maple
head(df)
datana::descstat(df[,c("total","dbh")])
graphics::plot(total ~ dbh, data=df)
slr.m1<-stats::lm(total ~ dbh, data=df)
## Example 1 -- store all the results to an object
out<-modresults(mod = slr.m1)
out$modsumm
out$sigma.e
out$press
out$tcal.coef
out$vp.tcal.coef
## Example 2
modresults(mod = slr.m1, print.output=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.