Learn R Programming

support.BWS3 (version 0.2-1)

milk: Consumer valuation of milk

Description

This dataset contains artificial responses to Case 3 BWS questions about consumer valuation of milk.

Usage

data(milk)

Arguments

Format

A data frame with 150 rows (respondents) and 20 columns (variables).

id

Identification number of respondents.

BLOCK

Serial number of blocks.

B1

Alternative selected as the best in question 1.

W1

Alternative selected as the worst in question 1.

B2

Alternative selected as the best in question 2.

W2

Alternative selected as the worst in question 2.

B3

Alternative selected as the best in question 3.

W3

Alternative selected as the worst in question 3.

B4

Alternative selected as the best in question 4.

W4

Alternative selected as the worst in question 4.

B5

Alternative selected as the best in question 5.

W5

Alternative selected as the worst in question 5.

B6

Alternative selected as the best in question 6.

W6

Alternative selected as the worst in question 6.

B7

Alternative selected as the best in question 7.

W7

Alternative selected as the worst in question 7.

B8

Alternative selected as the best in question 8.

W8

Alternative selected as the worst in question 8.

f

Dummy variable taking 1 if respondent is female, 0 otherwise.

age

Respondent's age: 2 = 20s; 3 = 30s; 4 = 40s; and 5 = 50s.

Author

Hideo Aizaki

References

Aizaki H, Takeshita H. (2023) Comparing consumer preferences for sustainable dairy activities among countries. Behaviormetrika 50: 653--677. (Open access paper)

Aizaki H, Nanseki T, Zhou H. (2013) Japanese consumer preferences for milk certified as good agricultural practice. Animal Science Journal 84: 82--89.

See Also

bws3.dataset, rotation.design, clogit

Examples

Run this code
if (FALSE) {
# Load packages
library(survival)
library(support.CEs)
# Define attributes and levels
## Each practice attribute has two levels: "wo.x" and "x".
## "wo" is an abbreviation of "without".
## "wo.x" means a milk carton without a label regarding practice x.
## "x" means a milk carton with a label regarding practice x.
attrs <- list(
 safety       = c("wo.safety", "safety"),
 worker       = c("wo.worker", "worker"),
 ghg          = c("wo.ghg", "ghg"),
 cattle       = c("wo.cattle", "cattle"),
 biodiversity = c("wo.biodiversity", "biodiversity"),
 price        = c(148, 158, 168, 178, 188, 198))
# Create choice sets
BWS3design <- rotation.design(
 attribute.names = attrs,
 nalternatives = 2,
 nblocks = 3,
 randomize = TRUE,
 seed = 987)
# Load a dataset "milk"
data(milk)
# Create a dataset
bws3dat <- bws3.dataset(
 data = milk,
 response = list(
  c("B1", "W1"), c("B2", "W2"), c("B3", "W3"), c("B4", "W4"),
  c("B5", "W5"), c("B6", "W6"), c("B7", "W7"), c("B8", "W8")),
 choice.sets = BWS3design,
 categorical.attributes = 
  c("safety", "worker", "ghg", "cattle", "biodiversity"),
 continuous.attributes  = c("price"),
 optout = TRUE,
 asc = c(0,0,1),
 model = "maxdiff")
# Fit a model
bws3mf <- RES ~ ASC3 + safety + worker + ghg + cattle +
                biodiversity + price + strata(STR)
bws3md.cl <- clogit(formula = bws3mf, data = bws3dat)
bws3md.cl
gofm(bws3md.cl)
mwtp(bws3md.cl, monetary.variables = "price")
}

Run the code above in your browser using DataLab