Learn R Programming

support.CEs (version 0.7-0)

rice: Synthetic respondent data set: consumers' valuation of rice

Description

Data set artificially created for an example based on an unlabeled DCE design. This example illustrates consumers' valuation of rice.

Usage

data(rice)

Arguments

Format

Data frames with 100 respondents on the following 12 variables.

ID

Identification number of respondents.

BLOCK

Serial number of blocks to which each respondent had been assigned.

q1

Response to choice experiment question 1.

q2

Response to choice experiment question 2.

q3

Response to choice experiment question 3.

q4

Response to choice experiment question 4.

q5

Response to choice experiment question 5.

q6

Response to choice experiment question 6.

q7

Response to choice experiment question 7.

q8

Response to choice experiment question 8.

q9

Response to choice experiment question 9.

F

Female dummy variable (1 = Female, otherwise 0).

Author

Hideo Aizaki

See Also

make.dataset, make.design.matrix, rotation.design, clogit

Examples

Run this code
library(survival)

if(getRversion() >= "3.6.0") RNGkind(sample.kind = "Rounding")

d.rice <- rotation.design(
  attribute.names = list(
    Region = c("RegA", "RegB", "RegC"),
    Cultivation = c("Conv", "NoChem", "Organic"),
    Price = c("1700", "2000", "2300")),
  nalternatives = 2,
  nblocks = 1,
  row.renames = FALSE,
  randomize = TRUE,
  seed = 987)

data(rice)

dm.rice <- make.design.matrix(
  choice.experiment.design = d.rice,
  optout = TRUE,
  categorical.attributes = c("Region", "Cultivation"),
  continuous.attributes = c("Price"),
  unlabeled = TRUE)

ds.rice <- make.dataset(
  respondent.dataset = rice,
  choice.indicators =
    c("q1", "q2", "q3", "q4", "q5",
      "q6", "q7", "q8", "q9"),
  design.matrix = dm.rice)

fm.rice <- RES ~ ASC + RegB + RegC + NoChem + Organic +
           NoChem:F + Organic:F + Price + strata(STR)
out.rice <- clogit(fm.rice, data = ds.rice)
out.rice

Run the code above in your browser using DataLab