accuracy.lm: Determine Accuracy of Linear Models (via differences between...

Description Usage Arguments Value Examples

View source: R/accuracy.lm.R

Description

Returns either a data frame of the actual value, the predicted value from the model, and the difference between the two OR a plot showing the distribution of differences

Usage

1
accuracy.lm(model, data, ind_column, round = 2, output = "data")

Arguments

model

model to be examined

data

data to be used in model - MUST include all predictors found in model

ind_column

independent (outcome) variable column in data - please use data$column syntax

round

number of digits the predicted value to be rounded to

output

default is output = "data", which returns a data frame. setting this to "plot" will plot the distribution of differences

Value

data frame or plot

Examples

1
2
3
4
## Not run: 
model <- lm(Petal.Length ~ ., data = iris)
accuracy.lm(model, iris, iris$Petal.Length, round = 2, output = "plot")
## End(Not run)

bmcguir8/mcguiR documentation built on Jan. 7, 2021, 8:40 p.m.