Conceptual Independence Matrix
CIM(
data,
scales,
conf.level = 0.95,
colors = c("#440154FF", "#7AD151FF"),
outputFile = NULL,
outputWidth = 100,
outputHeight = 100,
outputUnits = "cm",
faMethod = "minres",
n.iter = 100,
n.repeatOnWarning = 50,
warningTolerance = 2,
silentRepeatOnWarning = FALSE,
showWarnings = FALSE,
skipRegex = NULL,
headingLevel = 2,
printAbbreviations = TRUE,
drawPlot = TRUE,
returnPlotOnly = TRUE
)
CIM_partial(
x,
headingLevel = x$input$headingLevel,
quiet = TRUE,
echoPartial = FALSE,
partialFile = NULL,
...
)
# S3 method for CIM
knit_print(
x,
headingLevel = x$input$headingLevel,
quiet = TRUE,
echoPartial = FALSE,
partialFile = NULL,
...
)
The dataframe containing the variables.
The scales: a named list of character vectors, where the character vectors specify the variable names, and the names of each character vector specifies the relevant scale.
The confidence level for the confidence intervals.
The colors used for the factors. The default uses the
discrete viridis() palette, which is optimized for perceptual
uniformity, maintaining its properties when printed in grayscale,
and designed for colourblind readers. A vector can also be supplied;
the colors must be valid arguments to colorRamp()
(and therefore,
to col2rgb()
).
The file to write the output to.
The width, height, and units for the output file.
The method to pass on to psych::fa()
.
The number of iterations to pass on to psych::fa()
.
How often to repeat on warnings (in the hopes of getting a run without warnings).
How many warnings are accepted.
Whether to be chatty or silent when repeating after warnings.
Whether to show the warnings.
A character vector of length 2 containing two regular expressions; if the two scales both match one or both of those regular expressions, that cell is skipped.
The level for the heading; especially useful when knitting an Rmd partial.
Whether to print a table with the abbreviations that are used.
Whether to draw the plot or only return it.
Whether to return the plot only, or the entire object.
The object to print.
Whether to be quiet or chatty.
Whether to echo
the code in the Rmd partial.
Can be used to override the Rmd partial file.
Additional arguments are passed on the respective default methods.
A ggplot2::ggplot()
plot.
### Load dataset `bfi`, originally from psychTools package
data(bfi, package= 'ufs');
### Specify scales
bfiScales <-
list(Agreeableness = paste0("Agreeableness_item_", 1:5),
Conscientiousness = paste0("Conscientiousness_item_", 1:5),
Extraversion = paste0("Extraversion_item_", 1:5),
Neuroticism = paste0("Neuroticism_item_", 1:5),
Openness = paste0("Openness_item_", 1:5));
names(bfi) <- c(unlist(bfiScales),
c('gender', 'education', 'age'));
### Only select first two and the first three items to
### keep it quick; just pass the full 'bfiScales'
### object to run for all five the full scales
# \donttest{
CIM(bfi,
scales=lapply(bfiScales, head, 3)[1:2],
n.iter=10);
#> Error: 'box20' is not an exported object from 'namespace:GPArotation'
# }