pickMNLwinningCards: Choose the winning concepts in a CBC design matrix, according...

View source: R/cbc-data-handling.R

pickMNLwinningCardsR Documentation

Choose the winning concepts in a CBC design matrix, according to utilities

Description

Choose the winning concepts in a CBC design matrix, according to utilities

Usage

pickMNLwinningCards(
  design.mat,
  pws = rep(0, ncol(design.mat)),
  cards = 3,
  noise = FALSE,
  p.noise = 0.3,
  use.MNL = TRUE,
  verbose = TRUE,
  vec.format = "WIN"
)

Arguments

design.mat

A design matrix as created by generateMNLrandomTab

pws

A vector of utility coefficients for each column in design.mat. If missing, these are set to 0 and all winners will be drawn randomly.

cards

How many concepts are seen on each trial in the design matric.

noise

Whether to randomly make some choices (instead of using the utilties)

p.noise

The odds of randomly choosing a winner (instead of using the utilities)

use.MNL

Not used currently, placeholder for future.

verbose

Whether to output information as it runs.

vec.format

"WIN" will mark the winning row in the design matrix with a "1" and all others with "0". This would match a typical regression model to estimate coefficients from the observations. "ANS" will put the row number of the winning concept into the rows for each trial; some other software expects that format.

Value

A vector identifying which concept won each trial, according to the design matrix and supplied utilities.

See Also

[generateMNLrandomTab] to create a design matrix, [generateRNDpws] to create a random set of utilities.


cnchapman/choicetools documentation built on May 28, 2023, 9:14 a.m.