IV_by_period: Identify the WPA metrics that have the biggest change between...

View source: R/IV_by_Period.R

IV_by_periodR Documentation

Identify the WPA metrics that have the biggest change between two periods.

Description

[Experimental]

This function uses the Information Value algorithm to predict which Workplace Analytics metrics are most explained by the change in dates.

Usage

IV_by_period(
  data,
  before_start = min(as.Date(data$Date, "%m/%d/%Y")),
  before_end,
  after_start = as.Date(before_end) + 1,
  after_end = max(as.Date(data$Date, "%m/%d/%Y")),
  mybins = 10,
  return = "table"
)

Arguments

data

Person Query as a dataframe including date column named "Date" This function assumes the data format is MM/DD/YYYY as is standard in a Workplace Analytics query output.

before_start

Start date of "before" time period in YYYY-MM-DD. Defaults to earliest date in dataset.

before_end

End date of "before" time period in YYYY-MM-DD

after_start

Start date of "after" time period in YYYY-MM-DD. Defaults to day after before_end.

after_end

End date of "after" time period in YYYY-MM-DD. Defaults to latest date in dataset.

mybins

Number of bins to cut the data into for Information Value analysis. Defaults to 10.

return

String specifying what to return. The current only valid option is "table".

Value

data frame containing all the variables and the corresponding Information Value.

Author(s)

Mark Powers mark.powers@microsoft.com

See Also

Other Variable Association: IV_report(), create_IV(), plot_WOE()

Other Information Value: IV_report(), create_IV(), plot_WOE()

Other Time-series: create_line_asis(), create_line(), create_period_scatter(), create_trend(), period_change()

Examples


# Returns a data frame
sq_data %>%
  IV_by_period(
    before_start = "2019-12-15",
    before_end = "2019-12-29",
    after_start = "2020-01-05",
    after_end = "2020-01-26"
  )


wpa documentation built on Aug. 21, 2023, 5:11 p.m.