Datasets included with bayesm
bayesm bundles marketing datasets that can be loaded directly in R. The installed package help is the authoritative source for the datasets and examples available in your version.
List and load datasets
Section titled “List and load datasets”List the datasets in your installed release:
library(bayesm)data(package = "bayesm")Load a dataset and open its help page by name:
data(cheese)?cheeseExplore included data
Section titled “Explore included data”As of the current CRAN release (3.1-7), the package bundles nine datasets:
margarine, scanner-panel purchases used for household-level brand-choice and promotion research.cheese, weekly key-account sales, price, and display activity for sliced cheese.tuna, weekly store-level sales data for canned tuna.detailing, physician prescribing and sales-visit panel data.orangeJuice, store-level sales and marketing-mix data.Scotch, survey responses about Scotch brands consumed.bank, conjoint survey data about credit-card preferences.camera, conjoint survey data about digital-camera preferences.customerSat, customer-satisfaction survey data with scale-usage heterogeneity.
The bundled data fall into four broad types.
Scanner-panel data
Section titled “Scanner-panel data”Household purchases across trips and periods (e.g. margarine) can support models of brand choice, price sensitivity, and promotion response using rhierMnlRwMixture, rmnpGibbs, and rbprobitGibbs.
Key-account / store-level data
Section titled “Key-account / store-level data”Aggregate sales and marketing-mix measures by account, market, or store (e.g. cheese, orangeJuice, tuna) can support research on promotions, competitive dynamics, and sales response using runiregGibbs, rmultireg, and rsurGibbs.
Conjoint survey data
Section titled “Conjoint survey data”Choice-based conjoint data (e.g. bank, camera) can support partworth and preference-share estimation using the same hierarchical and multinomial choice functions listed above (rhierMnlRwMixture, rmnpGibbs), or, for aggregate-level analysis, rbayesBLP.
Other survey data
Section titled “Other survey data”Stated-preference, rating-scale, and brand-consumption survey measures (e.g. Scotch, customerSat) can support scale-usage and compositional analysis using rscaleUsage and instrumental-variables extensions such as rivGibbs and rivDP.
Use the data for replication
Section titled “Use the data for replication”Many bundled datasets come from or resemble data used in published marketing and econometrics research. Package help identifies sources, references, variables, and examples for individual datasets, supporting classroom exercises and methods benchmarking.
Use the CRAN reference manual for complete documentation.
Related pages
Section titled “Related pages”- bayesm — Install, document, and cite the package.
- Dataset catalog — Compare bayesm with the other resources available to everyone, without a subscription.



