corfun computes the Pearson or Spearman correlation coefficients for all variable pairs. Pearson is computed for comparisons of normally distributed numeric variables, Spearman for all other comparisons.

corfun(data, variables)

Arguments

data

The data set containing the variables.

variables

The variables for which correlation coefficients are to be computed.

Author

D. Schmitz

Examples

data("data_s")

corfun(data_s, c("sDurLog", "speakingRate", "typeOfS"))
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> 
#> 
#> Table: The following correlation coefficients were found:
#> 
#> |             | sDurLog| speakingRate| typeOfS|
#> |:------------|-------:|------------:|-------:|
#> |sDurLog      |      NA|           NA|      NA|
#> |speakingRate |  -0.237|           NA|      NA|
#> |typeOfS      |   0.206|         0.16|      NA|

corfun(data_s, c("sDurLog", "speakingRate", "typeOfS", "sDur"))
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> 
#> 
#> Table: The following correlation coefficients were found:
#> 
#> |             | sDurLog| speakingRate| typeOfS| sDur|
#> |:------------|-------:|------------:|-------:|----:|
#> |sDurLog      |      NA|           NA|      NA|   NA|
#> |speakingRate |  -0.237|           NA|      NA|   NA|
#> |typeOfS      |   0.206|        0.160|      NA|   NA|
#> |sDur         |   1.000|       -0.237|   0.206|   NA|

corfun(data_s, c("sDurLog", "speakingRate", "typeOfS", "sDur", "pauseDur", "pauseBin"))
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> Warning: Cannot compute exact p-value with ties
#> 
#> 
#> Table: The following correlation coefficients were found:
#> 
#> |             | sDurLog| speakingRate| typeOfS|  sDur| pauseDur| pauseBin|
#> |:------------|-------:|------------:|-------:|-----:|--------:|--------:|
#> |sDurLog      |      NA|           NA|      NA|    NA|       NA|       NA|
#> |speakingRate |  -0.237|           NA|      NA|    NA|       NA|       NA|
#> |typeOfS      |   0.206|        0.160|      NA|    NA|       NA|       NA|
#> |sDur         |   1.000|       -0.237|   0.206|    NA|       NA|       NA|
#> |pauseDur     |   0.471|       -0.161|   0.147| 0.471|       NA|       NA|
#> |pauseBin     |   0.456|       -0.125|   0.117| 0.456|    0.889|       NA|