This function will replace outliers based on a z-score cutoff
replace_outliers(
x,
variables = c(),
cutoff = 3.5,
with = "NA",
pass = 1,
id = "Subject",
log_file = NULL
)
dataframe
variables c() to be trimmed
z-score cutoff to use for trimming (default: 3.5)
What value should the trimmed values be replaced with. (default: with = "NA")
How many times to do outlier replacement? ex. pass = 2 will do a two-pass outlier replacement. (default: 1)
If variables = "all", then need to supply the subject ID variable
the file path and name for where to save a log file to