ce.dataset {support.CEs}R Documentation

Making a data set from a choice experiment design and respondent data set

Description

This function combines make.design.matrix and make.dataset. It returns a data set for analysis that is similar to one from make.dataset.

Usage

ce.dataset(data,
           response,
           design,
           categorical.attributes = NULL, 
           continuous.attributes = NULL,
           common = NULL,
           optout = TRUE,
           unlabeled = TRUE,
           binary = FALSE,
           detail = FALSE)

Arguments

data

A data frame containing respondents' answers to choice experiment questions. It corresponds to an argument respondent.dataset in make.dataset.

response

A vector of variables showing the alternative of which was selected in each choice experiment question. It corresponds to an argument choice.indicators in make.dataset.

design

A data frame containing a choice experiment design created by the function Lma.design or rotation.design. It corresponds to an argument choice.experiment.design in make.design.matrix.

categorical.attributes

A vector containing the names of attributes treated as categorical independent variables in the analysis.

continuous.attributes

A vector containing the names of attributes treated as continuous independent variables in the analysis.

common

A vector containing a fixed combination of attribute-levels corresponding to a common base option in each question. If there is no common base option, the argument is set as NULL (default).

optout

A logical variable describing whether or not the opt-out alternative is included in the design matrix created by this function. If TRUE (default), the opt-out alternative is included; otherwise it is not.

unlabeled

A logical variable describing the types of a choice experiment design assigned by the argument choice.experiment.design. If the type is unlabeled, the argument is set as TRUE (default). If the type is labeled, it is set as FALSE.

binary

When the function is applied to the conditional logit model, the argument is set as FALSE (default). When the function is applied to the binary choice model, it is set as TRUE.

detail

A logical variable describing whether or not some variables contained in the argument data and variables created in this function are stored in a data set produced by this function.

Details

This function provides a data set for analysis by combining a choice experiment design created by the function Lma.design or rotation.design and respondent data set. The resultant data set is similar to one from make.dataset.

For details on arguments, see help for make.dataset and make.design.matrix.

For details on the output, see help for make.dataset.

Value

This function provides a data set (data frame) for discrete choice analysis of responses to choice experiment questions. The resultant data set is similar to one from the function make.dataset. For details, see help for make.dataset.

Author(s)

Hideo Aizaki

See Also

make.dataset, make.design.matrix

Examples

# See "Examples" for the function make.dataset.

[Package support.CEs version 0.7-0 Index]