flag_outliers: flag_outliers

Description Usage Arguments Value Examples

Description

Identify highly influential observations based on both standardized residuals and cooks distance. Function is a wrapper for plot_outlier.resids and plot_cooksD.

Usage

1
flag_outliers(lin.mod, df, threshold, noplot)

Arguments

lin.mod

model fit, lm, glm, lmm, glmm

df

data frame in which to flag outlier observations. Must be same as used in lin.mod

threshold

threshold for outlier flagging. Usually 4 (4*mean cooks D)

noplot

optional to plot outlier observations, leave blank for no plot

Value

a list of observation indices based on the original data frame

Examples

1
df <- flag_outliers(lin.mod, df, threshold = 4, noplot = TRUE)

mikeod38/dauergut documentation built on May 30, 2019, 7:16 p.m.