turf.combos: Combination sets used in TURF analysis

Description Usage Arguments Details Value References Examples

Description

Generate combination sets to be used in TURF analysis, formatted for use in turf. Can be used to generate all possible combinations of n choose k or Monte Carlo simulated subsets of combinations involving the same n items.

Usage

1

Arguments

n

Required. Scalar indicating the number of items to be included in the TURF algorithm; 0 < n < (ncol(data) - 1). Non-integer values are coerced using floor(n).

k

Required. Vector of length 1 to n containing any values 1 to n indicating the combination sizes to be evaluated by the TURF algorithm. Non-integer values are coerced using floor(k).

...

Optional. Additional arguments controlling behavior and output of the TURF algorithm. See turf.args. Arguments indicated here must match named arguments in turf.args.

Details

Generally, it is only necessary to call turf.combos independently of turf if the user wishes to manually modify combination sets that will be evaluated. See turf and turf.args for additional information on usage.

Value

A list of length(k) elements, each of which is comprised of a p x n matrix of zeroes and ones. Rows (p) are individual combinations to be evaluted by the TURF algorithm. Columns (n) correspond to items and must be in the same order as the items variables in data submitted to TURF. Ones indicate that an item is included in a given combination. Each ith element contains only combinations of the size indicated by the ith position of k.

References

Adler, T.J., Smith, C. & Dumont, J. 2010. Optimizing product portfolios using discrete choice modeling and TURF. In: S. Hess, A. Daly (Eds), Choice modeling: the state-of-the-art and the state-of-practice; proceedings from the Inaugural International Choice Modeling Conference. Emerald Publishing Group Ltd., pp. 485-497.

Krieger, A.M. & Green, P.E. 2000. Turf revisited: Enhancements to toal unduplicated reach and frequency analysis. Marketing Research, 12, 30-36.

Markowitz, L. 2005. Going beyond TURF to complement and extend existing product lines. Ipsos-Insight, November 2005.

Miaoulis, G., Free, V. & Parsons, H. 1990. TURF: A new planning approach for product line extensions. Marketing Research, March, pp. 28-40.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  ##Example 1
  ##Generate all combinations of 3, 4, 5 and 6 items drawn from 10 items.
  ex1 <- turf.combos(10, 3:6)
  colSums(ex1[[2]])
 
  ##Example 2
  ##Pass additional arguments
  data(turf_ex_data)
  psims <- colSums(turf_ex_data[,-c(1:2)]) / sum(turf_ex_data[,2])
  psims <- psims / sum(psims)
  ex2 <- turf.combos(10, 4, mc=TRUE, nsims=100, psims=psims)
  colSums(ex2[[1]])  
  

Example output

Loading required package: dplyr

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

 [1] 84 84 84 84 84 84 84 84 84 84
 [1] 10 15 27 33 41 44 51 52 64 63

turfR documentation built on May 2, 2019, 3:21 a.m.