BayesConsensus: BayesConsensus

View source: R/BayesConsensus.R

BayesConsensusR Documentation

BayesConsensus

Description

Given a list of each person's answer, an estimate of each person's competence, and knowledge of the number of answers available (which... is somewhat inferable, but oh well) determine the probability that any given answer is correct for a particular question.

Usage

BayesConsensus(AnswersGiven, Competancy, numAnswers, Prior = -1)

Arguments

AnswersGiven

A data frame with rows representing individuals, and columns representing questions. Individual cells represent an individuals answer to a particular question.

Competancy

A list containing numbers between zero and 1 representing the probability that a given individuals KNOWS the answer to a question in advance.

numAnswers

The total number of answers available in each question. It is presently assumed that all questions have the same number of answers (I will investigate changing this later)

Prior

Do you have a prior distribution of probabilities over you answers? For example, in advance do you believe "A" is twice as likely as "B"? If so, please enter this as a matrix now. If not, the computer will assume a uniform distribution.

Value

A matrix, where columns represent questions and rows represent possible answers. Each entry represents the probability that a particular answer is "correct" for a particular question, within the cultural consensus framework.

Author(s)

Alastair Jamieson Lane. <aja107@math.ubc.ca>

Benjamin Grant Purzycki. <bgpurzycki@alumni.ubc.ca>

References

Oravecz, Z., Vandekerckhove, J., & Batchelder, W. H. (2014). Bayesian Cultural Consensus Theory. Field Methods, 1525822X13520280. http://doi.org/10.1177/1525822X13520280

Romney, A. K., Weller, S. C., & Batchelder, W. H. (1986). Culture as Consensus: A Theory of Culture and Informant Accuracy. American Anthropologist, 88(2), 313-338.

Examples

FakeData<- GenerateConsensusData(8,8,4)
Survey <- FakeData$Survey
M <- MakeDiscountedAgreementMatrix(Survey, 4)
Competance <- ComreySolve(M)
Probs <- BayesConsensus(Survey, Competance, 4)

alastair-JL/AnthroTools documentation built on March 7, 2024, 11:59 p.m.