credibleIntervals {bayespref}R Documentation

Calculates credible intervals for preferences

Description

This function calculates the credible intervals for preference parameters for individuals and the population using the object created by the function bayesPref.

Usage

credibleIntervals(prefres = NULL, burn = 0, interval = 0.95)

Arguments

prefres

An object returned by bayesPref.

burn

A value indicating the number of burnin samples discarded.

interval

A value between 0 and 1 indicating the size of the credible interval calculated.

Value

A list containing the following

IndPref

An array containing the lower credible interval, the median, and upper credible interval for the individual-level preference parameters.

PopPref

An array containing the lower credible interval, the median, and upper credible interval for the population-level preference parameters.

PopVar

A vector for the lower credible interval, the median, and upper credible interval for the variance of the population-level preference parameters (variance of alphas in Dirichlet).

Author(s)

Zachariah Gompert zgompert@uwyo.edu, James A. Fordyce jfordyce@utk.edu

Examples

## Not run: 
data(YGGV)
res <- bayesPref(pData=YGGV,mcmcL=1000)
credibleIntervals(prefres=res[[1]],burn=100) #credible intervals for population 1

## End(Not run)

[Package bayespref version 1.0 Index]