View source: R/MakeDiscountedAgreementMatrix.R
MakeDiscountedAgreementMatrix | R Documentation |
Given a bunch of answers to a survey, this function makes a matrix representing what fraction of the time each person agreed with each other person, and then discounts this value, based on how often you would expect this to happen by chance.
MakeDiscountedAgreementMatrix(SurveyResults, numAns)
SurveyResults |
A matrix containing the answers to a bunch of survey questions. Each row represents a particular individual and each column represents a particular question. |
numAns |
This is a number, and represents the total number of answers available for each question. Currently it is assumed that all questions have the same number of answers. If I get enough requests, I'll look into the programming and mathematics required to vectorise this so that different questions can have different numbers of answers. |
A matrix, where each entry represents the probability that two individuals will both know the answer to some randomly selected question.
Alastair Jamieson Lane. <aja107@math.ubc.ca>
Benjamin Grant Purzycki. <bgpurzycki@cas.au.dk>#' @export
FakeData<- GenerateConsensusData(8,8,4)
Survey <- FakeData$Survey
M <- MakeDiscountedAgreementMatrix(Survey, 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.