Learn R Programming

pgirmess (version 1.4.0)

cormat: Gives a correlation matrix and the probability of Ho for each correlation

Description

Gives a correlation matrix and the probability of Ho for each correlation estimate

Usage

cormat(donnees, method = "spearman", sep = FALSE)

Arguments

donnees
a data frame of numerics
method
a string of characters among 'pearson', 'spearman' (default), 'kendall'
sep
If true, gives the results in two matrices (default = F)

Value

  • If sep = F (default) a list including:
  • methodThe method used
  • prob.corUpper triangle, the correlations; lower triangle, the probability of Ho
  • If sep = T a list including:
  • methodThe method used
  • coef.estimatesThe correlation matrix
  • p.valueThe Ho probability matrix

Details

Wrapper for 'cor' and 'cor.test'. The results can be given in one or two matrices.

See Also

cor, cor.test

Examples

Run this code
cormat(longley)
cormat(longley,sep=TRUE)

Run the code above in your browser using DataLab