normality: normality

Description Usage Arguments Value Examples

View source: R/normality.R

Description

This function receives a linear regression model and p-value threshold and outputs the p-value from a Shapiro wilks test along with a statement indicating the results of the normality test

Usage

1
normality(data, formula, p_threshold = 0.05)

Arguments

data

a dataframe containing regression data

formula

a formula in the format "y ~ x1 + x2 + ..." indicating regression variables

p_threshold

a p_value indicating rejection threshold of Shapiro wilks test

Value

a float of the p-value and a string with the word Pass or Fail depending on the results of the test

Examples

1
2
library(tibble)
normality(tibble("X"=c(2,3,4), "y"=c(2,5,6)), "y ~ X")

UBC-MDS/linregasm documentation built on Feb. 6, 2022, 7 a.m.