| Type: | Package |
| Title: | Classical Cultural Consensus Analysis |
| Version: | 0.1.0 |
| Description: | Implements classical cultural consensus analysis with formal, informal, and covariance agreement models, 'UCINET'-aligned minimum-residual factor extraction, competence estimation, and answer-key estimation. Based on the classical framework of Romney, Weller, and Batchelder (1986) <doi:10.1525/aa.1986.88.2.02a00020>, Romney, Batchelder, and Weller (1987) <doi:10.1177/000276487031002003>, and Weller (2007) <doi:10.1177/1525822X07303502>. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Imports: | psych, stats |
| Suggests: | testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| Author: | Werner Hertzog [aut, cre] |
| Maintainer: | Werner Hertzog <werner.hertzog@isek.uzh.ch> |
| URL: | https://github.com/wernerhertzog/Romney |
| BugReports: | https://github.com/wernerhertzog/Romney/issues |
| NeedsCompilation: | no |
| Packaged: | 2026-05-15 11:40:23 UTC; wberga |
| Repository: | CRAN |
| Date/Publication: | 2026-05-20 08:50:15 UTC |
Agreement Matrices for Consensus Analysis
Description
Compute respondent-by-respondent agreement matrices for the formal, informal, and covariance consensus models.
Usage
agreement_formal(data, n_answers = NULL)
agreement_informal(data)
agreement_covariance(data, prior = 0.5)
Arguments
data |
A respondent-by-item matrix or data frame. |
n_answers |
Number of possible answers for the formal model. |
prior |
Prior proportion of true items for the covariance model. |
Value
A square agreement matrix.
Estimate a Formal Consensus Answer Key
Description
Estimate the most likely answer key under the formal consensus model.
Usage
answerkey_formal(data, competence, prior = NULL, answer_levels = NULL)
Arguments
data |
A respondent-by-item matrix or data frame. |
competence |
Numeric competence scores, one per respondent. |
prior |
Optional prior distribution over answer levels. |
answer_levels |
Optional ordered vector of allowable answer levels. |
Value
A list with key, probabilities, and levels.
Run a Cultural Consensus Analysis
Description
Run a cultural consensus analysis using UCINET-aligned minimum-residual factor extraction for the consensus eigensystem.
Usage
consensus(
data,
cultures = 1,
method = c("formal", "informal", "covariance"),
prior = 0.5,
return_answer_key = TRUE
)
Arguments
data |
A respondent-by-item matrix or data frame. |
cultures |
Number of latent cultures to extract. |
method |
One of |
prior |
Prior proportion of true items for the covariance model. |
return_answer_key |
Whether to estimate the answer key for the formal model. |
Value
An object of class romney_consensus.
Simulate Formal Consensus Data
Description
Simulate respondent-by-item response data for the formal consensus model.
Usage
simulate_consensus_data(
n_respondents,
n_questions,
n_answers = 2,
competence = 0.7,
seed = NULL
)
Arguments
n_respondents |
Number of respondents. |
n_questions |
Number of questions/items. |
n_answers |
Number of possible answers per item. |
competence |
Scalar or vector of respondent competences. |
seed |
Optional random seed. |
Value
A list with responses, key, and competence.