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

Description Usage Format Author(s) See Also Examples

Description

Data set artificially created for an example based on a labeled DCE design. This example illustrates consumers' valuation of pork.

Usage

1

Format

Data frames with 200 respondents on the following 6 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.

Author(s)

Hideo Aizaki

See Also

make.dataset, make.design.matrix, Lma.design, clogit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
library(survival)

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

d.pork <- Lma.design(
  attribute.names = list(
    Price = c("100", "130", "160", "190")),
  nalternatives = 3,
  nblocks = 4,
  row.renames = FALSE,
  seed = 987)

data(pork)

dm.pork <- make.design.matrix(
  choice.experiment.design = d.pork,
  optout = TRUE,
  continuous.attributes = c("Price"),
  unlabeled = FALSE)

ds.pork <- make.dataset(
  respondent.dataset = pork,
  choice.indicators =
    c("q1", "q2", "q3", "q4"),
  design.matrix = dm.pork)

fm.pork <- RES ~ ASC1 + Price1 +
                 ASC2 + Price2 +
                 ASC3 + Price3 +
                 strata(STR)
out.pork <- clogit(fm.pork, data = ds.pork)
out.pork

support.CEs documentation built on Jan. 8, 2021, 5:35 p.m.