ezlm: Easy-to-read Linear Model

Description Usage Arguments Value Examples

View source: R/ezlm.R

Description

Fits a simple linear regression model, outputting easy-to-read results rounded to user's preferred decimal place. A wrapper for lm().

Usage

1
ezlm(dataset, iv, dv, digits, ...)

Arguments

dataset

The data on which the modelling process will be run. This parameter is so named to indicate to the user that a dataset is required

iv

The variable to be passed to the modelling function as predictor. This parameter is so named to avoid any confusion about directionality.

dv

The variable to be passed to the modelling function as response. As above, this parameter is so named to avoid confusion about directionality.

digits

The number of digits to display for all computed numbers. This parameter is so named to indicate to the user that a number of digits is required

...

Additional arguments to lower level functions. na.action can be useful and takes several values (see https://stat.ethz.ch/R-manual/R-devel/library/stats/html/lm.html)

Value

Selected results of a linear regression on provided data in an easy-to-read format composed of text and rounded digits.

Examples

1
2
ezlm(mtcars, mtcars$mpg, mtcars$hp, 3)
ezlm(USArrests, USArrests$UrbanPop, USArrests$Assault, 2)

deansn/ezlm documentation built on Dec. 19, 2021, 10:06 p.m.