View source: R/GenerateConsensusData.R
GenerateConsensusData | R Documentation |
This function simulates a simple survey, and is useful for testing the "Bayesian consensus" part of the AnthroTools package. It returns three objects- the most important being a hypothetical survey.
GenerateConsensusData(numPeople, numQuestions, numAns, lockCompetance = NA)
numPeople |
The number of people being surveyed |
numQuestions |
The number of questions in your survey |
numAns |
The number of possible answers on each question. It is assumed that all questions have the same number of answers. |
The survey assumes that each question has N possible answers and one correct answer. Each survey has a well-defined competence (picked at random) which does not vary from question to question. Competence determines the probability that they KNOW the answer. Each question will also have a randomly assigned "correct" answer. For each question, if the survey recipient knows the correct answer (with probability equal to their competence) they will pick that answer. Otherwise they will pick at random. This procedure is done for every "survey recipient" and every question, until a full batch of survey data is produced.
The purpose of this function is to allow false data to be easily created such that a given set of real data can be compared statistically to what would be expected assuming all the assumptions of the model (see paper in references) are true.
This function will return a list containing three items.
Survey |
This is a matrix, containing each survey recipients answers to every quetion. This set of survey results gives good input for |
Answers |
This gives a single row data frame containing the "Correct" answers to each survey question. |
Competence |
This gives a list of the alleged skill level of each survey participant in your simulated survey. Please not that for small numbers of questions, you can expect a significant difference between this "true" competence measure and an individuals number of correct answers. |
Alastair Jamieson Lane. <aja107@math.ubc.ca>
Benjamin Grant Purzycki. <bgpurzycki@alumni.ubc.ca>
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.
FakeData<- GenerateConsensusData(5,5,3)
FakeSurvey<-FakeData$Survey
Results<- ConsensusPipeline(FakeSurvey,3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.