Last data update: 2014.03.03
R: Correlation mapping for reliability test
Correlation mapping for reliability test
Description
Implements a series of correlation analysis by dropping extreme data points one by one using Mahalanobis distance measure. Correlation reliability can be investigated with identified anchoring point(s). Correlation map as well as summary table is provided.
Usage
map.corr(data, from="median", threshold=0.3, r.name=FALSE)
Arguments
data
Dataframe
from
Datum point from which the distance is measured
"mean"
Mean of each column
"median"
Median of each column (default)
threshold
Threshold of correlation change to be noted on the map
r.name
Dropped points are shown in row name when TRUE
Value
$reliability
Summary table
Author(s)
Dong-Joon Lim, PhD
See Also
dm.mahalanobis
Distance measure using Mahalanobis distance
Examples
# Generate a sample dataframe
df<-data.frame(replicate(2,sample(0:100,50)))
# go
map.corr(df)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(DJL)
Loading required package: car
Loading required package: combinat
Attaching package: 'combinat'
The following object is masked from 'package:utils':
combn
Loading required package: lpSolveAPI
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DJL/map.corr.Rd_%03d_medium.png", width=480, height=480)
> ### Name: map.corr
> ### Title: Correlation mapping for reliability test
> ### Aliases: map.corr
>
> ### ** Examples
>
> # Generate a sample dataframe
> df<-data.frame(replicate(2,sample(0:100,50)))
>
> # go
> map.corr(df)
$reliability
corr drop n
0 -0.163378213247787 None 50
1 -0.214047920543349 6 49
2 -0.17212101970675 46 48
3 -0.130603220156238 40 47
4 -0.085782919941269 13 46
5 -0.0328185978390808 19 45
6 0.0202394289030883 32 44
7 0.0619085879888809 47 43
8 0.0831244514768948 37 42
9 0.0574061000347584 30 41
10 0.0103765603486822 50 40
11 -0.0324931376234124 7 39
12 -0.0881991860132209 38 38
13 -0.135217137891183 15 37
14 -0.17331410179874 33 36
15 -0.175583601151215 22 35
16 -0.237979517710897 39 34
17 -0.282317886320556 44 33
18 -0.254939942559152 16 32
19 -0.296334284419222 28 31
20 -0.32318152872117 20 30
21 -0.360222427109473 26 29
22 -0.414718021502287 2 28
23 -0.483415114796934 8 27
24 -0.505851047540616 25 26
25 -0.467957063352489 12 25
26 -0.511106692000052 27 24
27 -0.613974934143185 18 23
28 -0.706045722110541 41 22
29 -0.752026962264143 10 21
30 -0.790171579160014 3 20
31 -0.843935758334387 48 19
32 -0.87957179919327 42 18
33 -0.875109274815944 29 17
34 -0.881587864382181 34 16
35 -0.904323117052997 31 15
36 -0.873368167560734 24 14
37 -0.87986803392313 1 13
38 -0.913920376514434 14 12
39 -0.949399563494209 43 11
40 -0.973477689382076 11 10
41 -0.986065343336237 4 9
42 -0.992955495531775 5 8
43 -0.99545124771276 36 7
44 -0.995835902210371 9 6
45 -0.992471010200226 21 5
46 -0.997488339155213 23 4
47 -0.990071896570823 49 3
48 -1 17 2
>
>
>
>
>
> dev.off()
null device
1
>