Title: | Psychometric Evaluation Using Relative Excess Correlations |
---|---|
Description: | Modern results of psychometric theory are implemented to provide users with a way of evaluating the internal structure of a set of items guided by theory. These methods are discussed in detail in VanderWeele and Padgett (2024) <doi:10.31234/osf.io/rnbk5>. The relative excess correlation matrices will, generally, have numerous negative entries even if all of the raw correlations between each pair of indicators are positive. The positive deviations of the relative excess correlation matrix entries help identify clusters of indicators that are more strongly related to one another, providing insights somewhat analogous to factor analysis, but without the need for rotations or decisions concerning the number of factors. A goal similar to exploratory/confirmatory factor analysis, but 'recmetrics' uses novel methods that do not rely on assumptions of latent variables or latent variable structures. |
Authors: | R. Noah Padgett [aut, cre, cph]
|
Maintainer: | R. Noah Padgett <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2025-02-22 03:23:39 UTC |
Source: | https://github.com/noah-padgett/recmetrics |
Compute observed residuals for each variables in data and appends these newly created variables to the original dataset.
append_observed_residuals(data, na.rm = TRUE)
append_observed_residuals(data, na.rm = TRUE)
data |
A data.frame or tibble |
na.rm |
logical (defaults to TRUE) |
A numeric matrix of correlations among variable residuals.
# Use the SCWB data example data(SCWB) append_observed_residuals(SCWB[, 1:20])
# Use the SCWB data example data(SCWB) append_observed_residuals(SCWB[, 1:20])
Compute observed residual correlation (ORC) matrix among observed residuals for variables supplied data.
cor.orc(data, na.rm = TRUE)
cor.orc(data, na.rm = TRUE)
data |
A data.frame or tibble |
na.rm |
logical (defaults to TRUE) |
A numeric matrix of correlations among variable residuals.
# Use the SCWB data example data(SCWB) cor.orc(SCWB[, 1:20])
# Use the SCWB data example data(SCWB) cor.orc(SCWB[, 1:20])
Compute relative excess correlation (REC) matrix among variables in supplied data.
cor.rec(data, na.rm = TRUE)
cor.rec(data, na.rm = TRUE)
data |
A data.frame or tibble |
na.rm |
logical (defaults to TRUE) |
A numeric matrix of correlations among variable residuals.
# Use the SCWB data example data(SCWB) cor.rec(SCWB[, 1:20])
# Use the SCWB data example data(SCWB) cor.rec(SCWB[, 1:20])
A wrapper for computing the mean of the rows of a correlation matrix.
cor.rowMeans(x, na.rm = TRUE)
cor.rowMeans(x, na.rm = TRUE)
x |
A correlations |
na.rm |
logical (defaults to TRUE) |
A numeric vector of correlation means.
# Use the SCWB data example data(SCWB) mycor <- cor(SCWB) cor.rowMeans(mycor)
# Use the SCWB data example data(SCWB) mycor <- cor(SCWB) cor.rowMeans(mycor)
Compute observed residual covariances (ORC) matrix among observed residuals for variables supplied data.
cov.orc(data, na.rm = TRUE)
cov.orc(data, na.rm = TRUE)
data |
A data.frame or tibble |
na.rm |
logical (defaults to TRUE) |
A numeric matrix of correlations among variable residuals.
# Use the SCWB data example data(SCWB) cov.orc(SCWB[, 1:20])
# Use the SCWB data example data(SCWB) cov.orc(SCWB[, 1:20])
Compute relative excess covariances (REC) matrix among variables in supplied data.
cov.rec(data, na.rm = TRUE)
cov.rec(data, na.rm = TRUE)
data |
A data.frame or tibble |
na.rm |
logical (defaults to TRUE) |
A numeric matrix of correlations among variable residuals.
# Use the SCWB data example data(SCWB) cov.rec(SCWB[, 1:20])
# Use the SCWB data example data(SCWB) cov.rec(SCWB[, 1:20])
The average of the absolute values of the C-REC matrix entries (this is essentially how much relative excess correlation there is still to distribute across groupings)
rec.average(data, na.rm = TRUE)
rec.average(data, na.rm = TRUE)
data |
A data.frame or tibble (required) |
na.rm |
logical (defaults to TRUE) |
A single numerical value
{ # Use the SCWB data example # Metric 1 - item scores rec.average(SCWB[, 1:20]) # Metric 4 - domain total scores my_rec <- rec.average(SCWB[, 21:25]) my_rec # Metric 4 - averages mean(abs(my_rec[lower.tri(my_rec)])) }
{ # Use the SCWB data example # Metric 1 - item scores rec.average(SCWB[, 1:20]) # Metric 4 - domain total scores my_rec <- rec.average(SCWB[, 21:25]) my_rec # Metric 4 - averages mean(abs(my_rec[lower.tri(my_rec)])) }
For each domain i, the average of the REC entries within domain vs. the average of the REC entries when looking at correlations between indicators in domain D=i with indicators in domains other than i (note that this does NOT include correlations in domain j with other indicators in domain j; for a given domain, it is basically the average of the REC entries within the domain vs. the average of the REC entries for all of the other entries in the column of that domain). We might call this the REC domain coherence for domain i
rec.avg.wb.domains(data, domainlist = NULL, domainnames = NULL, na.rm = TRUE)
rec.avg.wb.domains(data, domainlist = NULL, domainnames = NULL, na.rm = TRUE)
data |
A data.frame or tibble (required) |
domainlist |
A list of character vectors or numeric vectors denoting the columns for each domain (required) |
domainnames |
A character vector supplying updated names to be attached to output |
na.rm |
logical (defaults to TRUE) |
A single numerical value
# Use the SCWB data example mylist <- list( domain_goodrel = c("cwbcloserel", "cwbrespect", "cwbtrust", "cwbmutuality"), domain_prolead = c("cwbbeneficence", "cwbintegrity", "cwbcompetence", "cwbvision"), domain_healthyprac = c("cwbrelgrowth", "cwbfairness", "cwbsustenance", "cwbachieve"), domain_satcomm = c("cwbsatisf", "cwbvalue", "cwbbelonging", "cwbwelcome"), domain_strongmiss = c("cwbpurpose", "cwbcontrib", "cwbinterconn", "cwbsynergy") ) rec.avg.wb.domains(SCWB, mylist)
# Use the SCWB data example mylist <- list( domain_goodrel = c("cwbcloserel", "cwbrespect", "cwbtrust", "cwbmutuality"), domain_prolead = c("cwbbeneficence", "cwbintegrity", "cwbcompetence", "cwbvision"), domain_healthyprac = c("cwbrelgrowth", "cwbfairness", "cwbsustenance", "cwbachieve"), domain_satcomm = c("cwbsatisf", "cwbvalue", "cwbbelonging", "cwbwelcome"), domain_strongmiss = c("cwbpurpose", "cwbcontrib", "cwbinterconn", "cwbsynergy") ) rec.avg.wb.domains(SCWB, mylist)
The average value of the REC domain coherence taken across domains (which, when the domains all have the same number of indicators, I believe will also equal the average within-domain REC vs. the average cross-domain REC); this gives a measure of the coherence of the partition formed by the various domains as a whole
rec.coherence(data, domainlist = NULL, domainnames = NULL, na.rm = TRUE)
rec.coherence(data, domainlist = NULL, domainnames = NULL, na.rm = TRUE)
data |
A data.frame or tibble (required) |
domainlist |
A list of character vectors or numeric vectors denoting the columns for each domain (required) |
domainnames |
A character vector supplying updated names to be attached to output |
na.rm |
logical (defaults to TRUE) |
A single numerical value
# Use the SCWB data example mylist <- list( domain_goodrel = c("cwbcloserel", "cwbrespect", "cwbtrust", "cwbmutuality"), domain_prolead = c("cwbbeneficence", "cwbintegrity", "cwbcompetence", "cwbvision"), domain_healthyprac = c("cwbrelgrowth", "cwbfairness", "cwbsustenance", "cwbachieve"), domain_satcomm = c("cwbsatisf", "cwbvalue", "cwbbelonging", "cwbwelcome"), domain_strongmiss = c("cwbpurpose", "cwbcontrib", "cwbinterconn", "cwbsynergy") ) rec.coherence(SCWB, mylist)
# Use the SCWB data example mylist <- list( domain_goodrel = c("cwbcloserel", "cwbrespect", "cwbtrust", "cwbmutuality"), domain_prolead = c("cwbbeneficence", "cwbintegrity", "cwbcompetence", "cwbvision"), domain_healthyprac = c("cwbrelgrowth", "cwbfairness", "cwbsustenance", "cwbachieve"), domain_satcomm = c("cwbsatisf", "cwbvalue", "cwbbelonging", "cwbwelcome"), domain_strongmiss = c("cwbpurpose", "cwbcontrib", "cwbinterconn", "cwbsynergy") ) rec.coherence(SCWB, mylist)
An (Number of Items)x(Number of Domains) matrix such that each row corresponds to an indicator, and the entry in column i is the average REC score for that indicator with the other indicators in domain i. This will allow one in some sense to see if certain indicators seem to have higher REC scores in a domain other than to the other in which they were assigned
rec.pattern.matrix( data, domainlist = NULL, domainnames = NULL, labels = NULL, na.rm = TRUE )
rec.pattern.matrix( data, domainlist = NULL, domainnames = NULL, labels = NULL, na.rm = TRUE )
data |
A data.frame or tibble (required) |
domainlist |
A list of character vectors or numeric vectors denoting the columns for each domain (required) |
domainnames |
A character vector supplying updated names to be attached to output |
labels |
A character vector supplying updated variable names to be attached to output |
na.rm |
logical (defaults to TRUE) |
A single numerical value
# Use the SCWB data example mylist <- list( domain_goodrel = c("cwbcloserel", "cwbrespect", "cwbtrust", "cwbmutuality"), domain_prolead = c("cwbbeneficence", "cwbintegrity", "cwbcompetence", "cwbvision"), domain_healthyprac = c("cwbrelgrowth", "cwbfairness", "cwbsustenance", "cwbachieve"), domain_satcomm = c("cwbsatisf", "cwbvalue", "cwbbelonging", "cwbwelcome"), domain_strongmiss = c("cwbpurpose", "cwbcontrib", "cwbinterconn", "cwbsynergy") ) rec.pattern.matrix(SCWB, mylist)
# Use the SCWB data example mylist <- list( domain_goodrel = c("cwbcloserel", "cwbrespect", "cwbtrust", "cwbmutuality"), domain_prolead = c("cwbbeneficence", "cwbintegrity", "cwbcompetence", "cwbvision"), domain_healthyprac = c("cwbrelgrowth", "cwbfairness", "cwbsustenance", "cwbachieve"), domain_satcomm = c("cwbsatisf", "cwbvalue", "cwbbelonging", "cwbwelcome"), domain_strongmiss = c("cwbpurpose", "cwbcontrib", "cwbinterconn", "cwbsynergy") ) rec.pattern.matrix(SCWB, mylist)
These Subjective Community Well-Being (SCWB) data are a random subset from the full dataset used in the paper by Padgett et al. (in press). The SCWB dataset contains 501 responses to the 20 SCWB items plus 5 pre-computed total scores on the five theorized domains of Good Relationships, Proficient Leadership, Healthy Practices, Satisfying Community, and Strong Mission.
data(SCWB)
data(SCWB)
SCWB
A data frame with 501 observations of 25 variables.cwbcloserel
cwbrespect
cwbtrust
cwbmutuality
cwbbeneficence
cwbintegrity
cwbcompetence
cwbvision
cwbrelgrowth
cwbfairness
cwbsustenance
cwbachieve
cwbsatisf
cwbvalue
cwbbelonging
cwbwelcome
cwbpurpose
cwbcontrib
cwbinterconn
cwbsynergy
total_goodrel
Mean of items cwbcloserel, cwbrespect, cwbtrust, cwbmutuality
total_prolead
Mean of items cwbbeneficence, cwbintegrity, cwbcompetence, cwbvision
total_healthyprac
Mean of items cwbrelgrowth, cwbfairness, cwbsustenance, cwbachieve
total_satcomm
Mean of items cwbsatisf, cwbvalue, cwbbelonging, cwbwelcome
total_strongmiss
Mean of items cwbpurpose, cwbcontrib, cwbintercon, cwbsynergy
Data used in Padgett et al. (in press).
Padgett, R.N., ...
# SCWB example used in preprint data(SCWB)
# SCWB example used in preprint data(SCWB)