GetDescriptives {beezdemand}R Documentation

Get Purchase Task Descriptive Summary

Description

Calculates descriptive statistics from purchase task data.

Usage

GetDescriptives(
  dat,
  bwplot = FALSE,
  outdir = "../plots/",
  device = "png",
  filename = "bwplot"
)

Arguments

dat

Dataframe (long form)

bwplot

Boolean. If TRUE, a ggplot2 box and whisker plot is saved. Default is FALSE.

outdir

Character. Directory where plot will be saved. Be sure to include trailing '/'. Default location is one level up in "../plots/".

device

Character. Type of file. Default is "png". Can be "pdf".

filename

Character. Specify filename. Defualt is "bwplot".

Details

Provides the following descriptive statistics from purchase task data at each price: mean consumption, median consumption, standard deviation of consumption, proportion of 0 values, number of NAs, minimum consumption, and maximum consumption.

Value

Dataframe with descriptive statistics

Author(s)

Brent Kaplan <bkaplan.ku@gmail.com>

Examples

GetDescriptives(apt)

[Package beezdemand version 0.1.2 Index]