Description Usage Arguments Details Value Note References Examples
Correct for attentuation. Operates on a list of correlation matrices.
1 | MDunatten(cor.mats, reals)
|
cor.mats |
A list of correlation matrices. Length of this list will be equal to the number of rows in the object passed to the reals argument. |
reals |
A matrix/data.frame of reliabilities. The column names must match the column/rownames of the correlation matrices exactly (order does not matter). |
Uses Spearman's (1904) formula:
ρ = \frac{r_{xy}}{√{r_{xx}r_{yy}}}
If a realibility is
missing (NA
) 1 will be used as a conservative
estimate.
Returns a list of correlation matrices corrected for attentuation.
Reliability column names must match exactly(including
case) the row/column names of the correlation matrices.
If needed add a column of NA
s.
Spearman, C. (1904) The proof and measurement of association between two things. The American Journal of Psychology, 15(1), 72-101.
1 2 3 4 5 6 7 8 9 10 11 12 13 | path <- system.file("extdata/bibTest.bib", package = "metaDAT")
dat <- read.MD(path)
realiabilities <- do.call(cbind, lapply(MDget(dat, c("disc_phi",
"dp_phi", "ee_phi", "pa_phi")), as.numeric))
rownames(realiabilities) <- names(dat)
correlations <- MDapply(dat, "correlation_triangle", MDlist2matrix)
#matching reliability column names to correlation row/col names
colnames(realiabilities) <- c("disc", "EE", "PA", "DP")
rownames(realiabilities) == names(correlations) #sanity check
MDunatten(correlations, realiabilities)
#reassign
dat <- MDassign(dat, "att.cor", MDunatten(correlations, realiabilities))
dat
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.