Output correlation coefficients for multiple items
Source:R/effects.R
effect_metrics_items_cor_items.Rd
The correlation is calculated using stats::cor.test
.
Usage
effect_metrics_items_cor_items(
data,
cols,
cross,
method = "pearson",
labels = TRUE,
clean = TRUE,
...
)
Arguments
- data
A tibble containing item measures.
- cols
Tidyselect item variables (e.g. starts_with...).
- cross
Tidyselect item variables (e.g. starts_with...).
- method
The output metrics, pearson = Pearson's R, spearman = Spearman's rho.
- labels
If TRUE (default) extracts labels from the attributes, see codebook.
- clean
Prepare data by data_clean.
- ...
Placeholder to allow calling the method with unused parameters from effect_metrics.
Examples
library(volker)
data <- volker::chatgpt
effect_metrics_items_cor_items(
data,
starts_with("cg_adoption_adv"),
starts_with("use"),
metric = TRUE
)
#>
#>
#> |Expectations | Usage| R squared| n| Pearson's r| ci low| ci high| df| t| p| stars|
#> |:-----------------------------------------------------------|-----------------------:|---------:|--:|-----------:|------:|-------:|--:|----:|-----:|-----:|
#> |ChatGPT has clear advantages compared to similar offerings. | in private context| 0.25| 99| 0.50| 0.33| 0.63| 97| 5.61| 0.000| ***|
#> |ChatGPT has clear advantages compared to similar offerings. | in professional context| 0.07| 99| 0.27| 0.07| 0.44| 97| 2.73| 0.008| **|
#> |Using ChatGPT brings financial benefits. | in private context| 0.03| 99| 0.17| -0.03| 0.36| 97| 1.73| 0.087| .|
#> |Using ChatGPT brings financial benefits. | in professional context| 0.28| 99| 0.53| 0.37| 0.66| 97| 6.19| 0.000| ***|
#> |Using ChatGPT is advantageous in many tasks. | in private context| 0.12| 99| 0.34| 0.16| 0.51| 97| 3.59| 0.001| ***|
#> |Using ChatGPT is advantageous in many tasks. | in professional context| 0.12| 99| 0.35| 0.17| 0.51| 97| 3.71| 0.000| ***|
#> |Compared to other systems, using ChatGPT is more fun. | in private context| 0.22| 99| 0.47| 0.30| 0.61| 97| 5.28| 0.000| ***|
#> |Compared to other systems, using ChatGPT is more fun. | in professional context| 0.07| 99| 0.27| 0.07| 0.44| 97| 2.73| 0.008| **|
#>
#> 2 missing case(s) omitted.
#>