ErrorCorCov: Calculate correlation and covariance of residuals

View source: R/fErrorCorCov.R

ErrorCorCovR Documentation

Calculate correlation and covariance of residuals

Description

This function calculates the residuals (the squared difference of each value from the mean) of two groups. Then it calculates the correlation and covariance between the residuals of the two groups and plots them.

Usage

ErrorCorCov(dataset1, dataset2, plot = F)

Arguments

dataset1

A vector containing the values of the first group.

dataset2

A vector containing the values of the second group.

plot

(default=TRUE). Plot the errors of the first group versus the second one.

Value

Returns a list with the residuals of the two groups (distr1Error, distr2Error), the correlation coefficient between the two groups (Correlation) and the covariance of the two groups (Covariance).

Examples

## Not run: 
ErrorOFCorCov=ErrorCorCov(sampleA$HDL[1:20],sampleA$CHOL[1:20],plot = FALSE)
 
## End(Not run)

LDLcalc documentation built on May 31, 2022, 5:07 p.m.