Skip to contents

Given a "turf_reach_weighted" object and a vector of item names, computes the Total Unduplicated Reach probability of that portfolio.

Usage

calc_turf_weighted_reach_one(turf_data, portfolio, a)

Arguments

turf_data

An object of class "turf_reach_weighted", as returned by prepare_turf_reach_weighted().

portfolio

A character vector of column names (items) in x$uc.

a

Integer. The total number of alternatives in the MaxDiff task.

Value

A numeric value: the weighted TURF reach probability of the portfolio.

Examples

mat <- matrix(rnorm(6), 3, 2,
  dimnames = list(paste0("R", 1:3), c("X", "Y"))
)
prep <- prepare_turf_reach_weighted(mat, NULL)
calc_turf_weighted_reach_one(prep, c("X", "Y"), a = 2L)
#> $reach
#> [1] 0.715368
#>