R/calculate_total_cm.R

Defines functions calculate_total_cm

Documented in calculate_total_cm

#' Calculate Total CM
#'
#' @param rev_per_click vector of rev per click samples
#' @param cost_per_click vector of cost per click (cpc) samples
#' @param expected_clicks vector of expected clicks (expected CTR * fixed impressions)
#'
#' @return vector of CM estimates (dbl)
#'
calculate_total_cm <- function(rev_per_click, cost_per_click, expected_clicks){
  (rev_per_click - cost_per_click) * expected_clicks
}
rangi513/grizbayr documentation built on Oct. 17, 2023, 1:22 a.m.