ga_check_anomaly: A function to perform Anomaly Detection This is based on...

Description Usage Arguments

View source: R/ga_anomaly_detection.R

Description

A function to perform Anomaly Detection This is based on Twitter's package

Usage

1
2
3
ga_check_anomaly(..., df = NULL, time_col = "date", value_col = NULL,
  title = NULL, anoms = 0.02, direction = direction,
  piecewise_median_period_wk = NULL, y_log = y_log, longterm = NULL)

Arguments

...

extra values to be passed to AnomalyDetection::AnomalyDetectionTs.

df

Data frame

time_col

Column that has time data. We assume this is either 'date', 'datehour“ from Google Analytics API

value_col

Column that has value data

direction

Direction of anomaly. Positive ("posi"), Negative ("neg") or "both".

longterm

Increase anom detection efficacy for time series that are greater than a month. This automatically becomes TRUE if the data is longer than 30 days.

time_unit

Time unit for aggregation.

fun.aggregate

Function to aggregate values.

e_value

Whether expected values should be returned.

na_fill_type

- Type of NA fill: "previous" - Fill with previous non-NA value. "value" - Fill with the value of na_fill_value. "interpolate" - Linear interpolation. "spline" - Spline interpolation. NULL - Skip NA fill. Use this only when you know there is no NA.

na_fill_value

- Value to fill NA when na_fill_type is "value"


IronistM/googleAnalyticsModelR documentation built on May 17, 2019, 1:13 a.m.