ConsensusPipeline: ConsensusPipeline

View source: R/ConsensusPipeline.R

ConsensusPipelineR Documentation

ConsensusPipeline

Description

This is the main function to use when trying to do consensus analysis on a selection of survey data. This function pretty much streamlines all the consensus analysis functions currently contained in the package into one function.

Usage

ConsensusPipeline(SurveyResults, numQ, safetyOverride = FALSE,
  ComreyFactorCheck = FALSE)

Arguments

SurveyResults

These are your survey results, written as a data frame. Rows are expected to represent participants, columns to represent individual questions. Each cell contains a particular individuals answer to a particular question- currently coded as a number (it is assumed questions are multiple choice).

numQ

Currently this is a single number representing the number of possible answers to each question (hence for a true/false question, enter "2", for a multiple-choice, "4" perhaps, depending on the number of options).

safetyOverride

This function has a variety of checks designed to catch apparent paradoxes in the data. Setting the safetyOveride to true will override these safety checks. WARNING: It is almost definitely unwise to mess with this parameter. It exists only for use when simulating LARGE numbers of surveys (where inevitably one of the million surveys will, by chance, violate some assumption or another). Please do not use when dealing with your data.

ComreyFactorCheck

This function Originally compared the largest two Comrey factors to determine if the ratio was greater then 3 (a standard rule of thumb in the literature). Further testing has suggested this can at times be a somewhat misleading metric, and thus the function no longer does this by default, but will if this parameter is set to TRUE.

Details

This method takes a set of survey results, along with a number representing the number of possible answers to each question. It calculates the correlation between different people's answers, corrects for random chance, estimates each individual's expertise, and then determines the most likely answer for each question.

Value

This function returns a list with four components.

Answers

A list of the function's estimated answers for each question.

Competence

The estimated competence for each individual (the probability that they would KNOW the answer to some future question).

origCompetence

The competence originally calculated (before the pipeline force it into the [0,1] range).

TestScore

The supposed test score of each individual, assuming the answer key determined by the method

Probs

The probability that each answer is correct for a given question ASSUMING that the method has correctly determined each individuals competence. Given how Competence is calculated, (from the model) it may be reckless to take this "probability" too seriously.

reportback

A string containing some report back information (number of negative competencies, ratio of factor magnitudes). For explaination of use of factor magnitudes rather than Eigenvalues, see ConsensusCaveats.

reportNumbers

A vector containing the numbers contained in reportback, in case you need to do some sort of statistical analysis them. Numbers given in same order as reportback.

Note

If you wish to stress test this function or determine the expected variance using a large number of simulations, use ConsensusStressTest. For a discussion of the limitations of the methods, and potential pitfalls of the programme, examine ConsensusCaveats.

This function (and library) could probably use some additional features. If there are particular features you would like to see added, please email Jamieson-Lane, and he will see about adding them.

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/1525822X1352028

  • 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(16,16,4)
Survey <- FakeData$Survey
ConsensusResult <- ConsensusPipeline(Survey,4)
ConsensusResult$Answers
FakeData$Answers


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