View source: R/DataUnderstanding.R
DisplayCoefficients | R Documentation |
Displays either coefficients from a named vector or from a lm-model.
DisplayCoefficients(CoefficientVectorOrlmModel, DisplayIntercept = F)
CoefficientVectorOrlmModel |
either a named vectoror a lm-model result. |
DisplayIntercept |
boolean. If TRUE, everytrhing that sounds like 'intercept' will be deleted out of the dataset |
If the character vector has no coefficient names, a character vector in form v1...vk (k: number of coefficients in vector) will be built.
data.frame. DataFrame of coefficients with three variables: variablenames, Coefficients, PositiveDirection
## Mode 1: named vector # Generate some data Coefficients <- c(0.5, 0.7, -0.3) names(Coefficients) <- c("Klarheit", "Freundlichkeit", "Dauer") ## Call function DisplayCoefficients(CoefficientVectorOrlmModel = Coefficients, DisplayIntercept = F) ## Mode 2: lm model output # Generate a lm-object: mtcarsLmComplete <- lm(mpg ~ ., data = mtcars) ## Call function DisplayCoefficients(CoefficientVectorOrlmModel = mtcarsLmComplete, DisplayIntercept = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.