Learn R Programming

Path.Analysis (version 0.1)

corr: Correlation Analysis

Description

[Stable]

  • corr() estimates Pearson correlation coefficients among parametric numerical characteristics as follows:

  • The Pearson correlation coefficient:

    r_x,y = nxy-(x)(y) (nx^2-(x)^2)(ny^2-(y)^2)

or:

r_x,y =(x-x)(y-y) (x-x)^2(y-y)^2

where r_x,y is the correlation coefficient between x and y variables.

Usage

corr(datap, verbose = FALSE)

Value

Returns a list of two objects:

Correlations

the data frame of Pearson's correlation coefficients

P_values

the data frame of significance of correlation coefficients (r):

p p-value for testing the r lowCI lower confidence interval of r uppCI upper confidence interval of r

Arguments

datap

The data set

verbose

If verbose = TRUE then some results are printed in the console.

Author

Ali Arminian abeyran@gmail.com

Details

The corr() function estimates correlation coefficients and their significance in the form of a table of one or more independent (exogenous) variables on a dependent (endogenous) variable along with testing the significance.

See Also

correlation

Examples

Run this code
# \donttest{
data(dtsimp)
corr(dtsimp, verbose = FALSE)
# }
# \donttest{
data(dtraw)
corr(dtraw[, -1], verbose = FALSE)
# }

Run the code above in your browser using DataLab