dissim: Calculate Dissimilarity Matrix Data

Description Usage Arguments Value Author(s) See Also Examples

Description

These functions calculate different measures related to dissimilarity matrices. All of these functions allow you to specify one of many dissimilarity indices to be used.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
dissim.clust(elem, is.OTU=TRUE, stand.method=NULL,
             dist.method="morisita", clust.method="average")
dissim.eig(elem, is.OTU=TRUE, stand.method=NULL,
           dist.method="morisita")
dissim.ord(elem, is.OTU=TRUE, stand.method=NULL,
           dist.method="morisita", k=NULL)
dissim.GOF(elem, is.OTU=TRUE, stand.method=NULL,
           dist.method="morisita")
dissim.tree(elem, is.OTU=TRUE, stand.method=NULL,
           dist.method="morisita", clust.method="average")
dissim.pvar(elem, is.OTU=TRUE, stand.method=NULL,
            dist.method="morisita")

Arguments

elem

an ecology data set that can be an OTU table or a taxonomy abundance table. See RAM.input.formatting for details.

is.OTU

logical, whether the ecology data sets are OTU tables or taxonomy abundance matrices. See RAM.input.formatting for details.

stand.method

optional, if is.null, the standardization method for data transforamtion; must be one of the following: "total", "max", "frequency", "normalize", "range", "standardize", "pa", "chi.square", "hellinger", "log". See also decostand.

dist.method

the dissimilarity index to be used; one of "manhattan", "euclidean", "canberra", "bray", "kulczynski", "jaccard", "gower", "altGower","morisita", "horn", "mountford", "raup", "binomial", "chao", or "cao". See also vegdist.

k

the number of dimensions desired. If NULL, the maximum value will be calculated and used.

clust.method

the method used for clustering the data. Must be one of "ward", "single", "complete", "average", "mcquitty", "median", or "centroid". See also hclust.

Value

dissim.clust

returns a hierarchical clustering of the dissimilarity matrix.

dist.eigenval

returns the eigenvalues of the dissimilarity matrix.

dissim.ord

returns a list: the first item is the the ordination distances, the second is the dissimilarity matrix distances.

dissim.GOF

returns the goodness of fit values of the dissimilarity matrix, for various numbers of dimensions used.

dissim.tree

returns a list: the first item is the tree distances, the second is the dissimilarity matrix distances.

dissim.pvar

returns a numeric vector containing the percent variation explained by each axis (where each sample corresponds to an axis).

Author(s)

Wen Chen and Joshua Simpson

See Also

decostand, vegdist, hclust, dissim.plot

Examples

1
2
3
4
5
6
7
8
9
data(ITS1)
# calculate clustering, using default method
dissim.clust(ITS1)
# calculate tree distances, specifying a distance method
# (but use default clustering method)
dissim.tree(ITS1, dist.method="euclidean")
# calcualte ordination distances, specifying both distance
# and ordination methods
dissim.ord(ITS1, dist.method="bray", k=3)

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-4
Loading required package: ggplot2
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied

Call:
hclust(d = dist, method = clust.method)

Cluster method   : average 
Distance         : morisita 
Number of objects: 16 

[[1]]
           P1001.1M1 P1001.1M2 P1001.1M3 P1001.1M4 P1001.1M5 P1001.1M6
P1001.1M2   1851.811                                                  
P1001.1M3   2606.052  2606.052                                        
P1001.1M4   3963.624  3963.624  3963.624                              
P1001.1M5   5013.779  5013.779  5013.779  5013.779                    
P1001.1M6   5013.779  5013.779  5013.779  5013.779  1889.346          
P1001.1M7   5013.779  5013.779  5013.779  5013.779  2947.322  2947.322
P1001.1M8   5013.779  5013.779  5013.779  5013.779  2947.322  2947.322
P1001.1M9   6672.613  6672.613  6672.613  6672.613  6672.613  6672.613
P1001.1M10  3963.624  3963.624  3963.624  2505.439  5013.779  5013.779
P1001.1M11  6672.613  6672.613  6672.613  6672.613  6672.613  6672.613
P1001.1M12  6672.613  6672.613  6672.613  6672.613  6672.613  6672.613
P1001.1M13 12449.254 12449.254 12449.254 12449.254 12449.254 12449.254
P1001.1M14 12449.254 12449.254 12449.254 12449.254 12449.254 12449.254
P1001.1M15 22852.222 22852.222 22852.222 22852.222 22852.222 22852.222
P1001.1M16 22852.222 22852.222 22852.222 22852.222 22852.222 22852.222
           P1001.1M7 P1001.1M8 P1001.1M9 P1001.1M10 P1001.1M11 P1001.1M12
P1001.1M2                                                                
P1001.1M3                                                                
P1001.1M4                                                                
P1001.1M5                                                                
P1001.1M6                                                                
P1001.1M7                                                                
P1001.1M8   1031.047                                                     
P1001.1M9   6672.613  6672.613                                           
P1001.1M10  5013.779  5013.779  6672.613                                 
P1001.1M11  6672.613  6672.613  4531.154   6672.613                      
P1001.1M12  6672.613  6672.613  4531.154   6672.613   3851.231           
P1001.1M13 12449.254 12449.254 12449.254  12449.254  12449.254  12449.254
P1001.1M14 12449.254 12449.254 12449.254  12449.254  12449.254  12449.254
P1001.1M15 22852.222 22852.222 22852.222  22852.222  22852.222  22852.222
P1001.1M16 22852.222 22852.222 22852.222  22852.222  22852.222  22852.222
           P1001.1M13 P1001.1M14 P1001.1M15
P1001.1M2                                  
P1001.1M3                                  
P1001.1M4                                  
P1001.1M5                                  
P1001.1M6                                  
P1001.1M7                                  
P1001.1M8                                  
P1001.1M9                                  
P1001.1M10                                 
P1001.1M11                                 
P1001.1M12                                 
P1001.1M13                                 
P1001.1M14   5510.646                      
P1001.1M15  22852.222  22852.222           
P1001.1M16  22852.222  22852.222   2745.462

[[2]]
           P1001.1M1 P1001.1M2 P1001.1M3 P1001.1M4 P1001.1M5 P1001.1M6
P1001.1M2   1851.811                                                  
P1001.1M3   1866.650  3345.453                                        
P1001.1M4   3852.518  2193.254  5444.446                              
P1001.1M5   4768.865  4149.584  5769.415  4376.190                    
P1001.1M6   4123.574  2932.336  5512.916  2550.375  1889.346          
P1001.1M7   5476.010  5129.181  6154.981  5738.036  2305.496  3539.500
P1001.1M8   5938.635  5557.648  6545.136  6063.782  2214.540  3729.752
P1001.1M9   5006.112  4857.036  5978.224  5159.390  5971.004  5241.537
P1001.1M10  3963.442  2896.047  5432.036  2505.439  4528.567  3111.638
P1001.1M11  6998.057  6797.269  7878.146  6764.666  7556.292  6941.974
P1001.1M12  6918.674  6775.531  7946.825  6691.987  7452.719  6782.516
P1001.1M13 15764.564 15515.023 16286.703 15386.464 15533.339 15337.395
P1001.1M14 11044.531 10681.834 11806.624 10469.793 10807.979 10440.200
P1001.1M15 26410.310 26218.344 26716.357 26121.331 26194.577 26110.720
P1001.1M16 24259.200 24076.561 24596.765 23988.474 24019.932 23939.297
           P1001.1M7 P1001.1M8 P1001.1M9 P1001.1M10 P1001.1M11 P1001.1M12
P1001.1M2                                                                
P1001.1M3                                                                
P1001.1M4                                                                
P1001.1M5                                                                
P1001.1M6                                                                
P1001.1M7                                                                
P1001.1M8   1031.047                                                     
P1001.1M9   6842.739  7233.432                                           
P1001.1M10  5722.094  6126.613  2908.944                                 
P1001.1M11  8518.836  8714.305  4869.734   5676.274                      
P1001.1M12  8626.381  8883.616  4192.574   5038.053   3851.231           
P1001.1M13 16125.383 16082.759 14352.252  14808.014  10136.219  12626.458
P1001.1M14 11628.057 11665.615  9360.918   9656.363   5655.493   7610.122
P1001.1M15 26561.933 26449.341 25440.410  25859.991  21111.903  23877.201
P1001.1M16 24423.237 24322.010 23142.679  23610.164  18839.905  21447.304
           P1001.1M13 P1001.1M14 P1001.1M15
P1001.1M2                                  
P1001.1M3                                  
P1001.1M4                                  
P1001.1M5                                  
P1001.1M6                                  
P1001.1M7                                  
P1001.1M8                                  
P1001.1M9                                  
P1001.1M10                                 
P1001.1M11                                 
P1001.1M12                                 
P1001.1M13                                 
P1001.1M14   5510.646                      
P1001.1M15  11544.959  16977.518           
P1001.1M16   9079.412  14522.388   2745.462

[[1]]
            P1001.1M1  P1001.1M2  P1001.1M3  P1001.1M4  P1001.1M5  P1001.1M6
P1001.1M2  0.18401744                                                       
P1001.1M3  0.06176749 0.23883533                                            
P1001.1M4  0.67279774 0.49794212 0.72864830                                 
P1001.1M5  0.43931536 0.41932347 0.43072855 0.71220274                      
P1001.1M6  0.43579850 0.36441237 0.44501566 0.58995955 0.12657835           
P1001.1M7  0.47081295 0.46442189 0.45585234 0.77021655 0.06420233 0.18338222
P1001.1M8  0.48436705 0.48392944 0.46710721 0.79058631 0.08036738 0.20234967
P1001.1M9  0.35853525 0.45671782 0.35909607 0.78959530 0.63781624 0.63696832
P1001.1M10 0.30173652 0.30831234 0.33738878 0.57781394 0.57761754 0.53622650
P1001.1M11 0.52259198 0.57733286 0.53121646 0.79677431 0.72916578 0.71376874
P1001.1M12 0.52612882 0.57158421 0.54046443 0.77300869 0.75611051 0.73297211
P1001.1M13 0.80030024 0.81181764 0.80591943 0.89084569 0.80263919 0.78426825
P1001.1M14 0.75903076 0.77298995 0.76620617 0.86261001 0.79104925 0.77050271
P1001.1M15 0.87048901 0.86270832 0.87752808 0.89318591 0.80677065 0.78319917
P1001.1M16 0.85799442 0.85603364 0.86414184 0.90034227 0.80822151 0.78709591
            P1001.1M7  P1001.1M8  P1001.1M9 P1001.1M10 P1001.1M11 P1001.1M12
P1001.1M2                                                                   
P1001.1M3                                                                   
P1001.1M4                                                                   
P1001.1M5                                                                   
P1001.1M6                                                                   
P1001.1M7                                                                   
P1001.1M8  0.02436488                                                       
P1001.1M9  0.67774507 0.68258591                                            
P1001.1M10 0.62968907 0.64109640 0.21482353                                 
P1001.1M11 0.77584975 0.77930514 0.19218783 0.28393579                      
P1001.1M12 0.80481001 0.80983830 0.20577594 0.26745986 0.05986338           
P1001.1M13 0.84901227 0.84643114 0.54436555 0.57809732 0.38720324 0.41992339
P1001.1M14 0.83885386 0.83746572 0.49295826 0.52746734 0.32984265 0.36054141
P1001.1M15 0.85264587 0.84920217 0.65425489 0.66219651 0.50983452 0.54085540
P1001.1M16 0.85384911 0.85034751 0.63128976 0.64739300 0.48409444 0.51614646
           P1001.1M13 P1001.1M14 P1001.1M15
P1001.1M2                                  
P1001.1M3                                  
P1001.1M4                                  
P1001.1M5                                  
P1001.1M6                                  
P1001.1M7                                  
P1001.1M8                                  
P1001.1M9                                  
P1001.1M10                                 
P1001.1M11                                 
P1001.1M12                                 
P1001.1M13                                 
P1001.1M14 0.06055481                      
P1001.1M15 0.13876395 0.19211785           
P1001.1M16 0.10689195 0.16274404 0.03381889

[[2]]
            P1001.1M1  P1001.1M2  P1001.1M3  P1001.1M4  P1001.1M5  P1001.1M6
P1001.1M2  0.28716680                                                       
P1001.1M3  0.19465973 0.39894422                                            
P1001.1M4  0.74063369 0.62462632 0.78892982                                 
P1001.1M5  0.57360439 0.57899372 0.59235888 0.74331429                      
P1001.1M6  0.58963799 0.58667238 0.64047778 0.67706750 0.30057585           
P1001.1M7  0.57473277 0.58567533 0.57165784 0.77734492 0.22165012 0.38866720
P1001.1M8  0.60025089 0.61159753 0.59410845 0.79877361 0.23967143 0.40178438
P1001.1M9  0.54490985 0.62689131 0.57296207 0.81928292 0.69146441 0.73051792
P1001.1M10 0.57524021 0.57175701 0.63943777 0.70736146 0.65387107 0.66030140
P1001.1M11 0.65844828 0.72782403 0.67292925 0.82381128 0.76152725 0.76460082
P1001.1M12 0.71029225 0.78281208 0.72792884 0.82147520 0.80651823 0.80733536
P1001.1M13 0.82956619 0.85163636 0.85308259 0.91066730 0.83549517 0.83920073
P1001.1M14 0.83720930 0.84331855 0.86347713 0.89429958 0.82724810 0.83015847
P1001.1M15 0.88642648 0.90176953 0.89830128 0.93942585 0.87813694 0.88716109
P1001.1M16 0.87011569 0.88660993 0.88646857 0.92907450 0.85929648 0.86749220
            P1001.1M7  P1001.1M8  P1001.1M9 P1001.1M10 P1001.1M11 P1001.1M12
P1001.1M2                                                                   
P1001.1M3                                                                   
P1001.1M4                                                                   
P1001.1M5                                                                   
P1001.1M6                                                                   
P1001.1M7                                                                   
P1001.1M8  0.11964633                                                       
P1001.1M9  0.70845312 0.71111343                                            
P1001.1M10 0.72731281 0.74134368 0.38084915                                 
P1001.1M11 0.80989357 0.81244791 0.37141703 0.51730104                      
P1001.1M12 0.85682741 0.85907011 0.45568818 0.57904613 0.27970677           
P1001.1M13 0.86977887 0.87273170 0.60702640 0.68630219 0.48290709 0.55847167
P1001.1M14 0.86587901 0.86891094 0.57111380 0.65864805 0.44412022 0.49873029
P1001.1M15 0.90581068 0.90802458 0.75287601 0.78463173 0.62992930 0.72810521
P1001.1M16 0.88724843 0.89035282 0.70210726 0.76267683 0.59385229 0.66274730
           P1001.1M13 P1001.1M14 P1001.1M15
P1001.1M2                                  
P1001.1M3                                  
P1001.1M4                                  
P1001.1M5                                  
P1001.1M6                                  
P1001.1M7                                  
P1001.1M8                                  
P1001.1M9                                  
P1001.1M10                                 
P1001.1M11                                 
P1001.1M12                                 
P1001.1M13                                 
P1001.1M14 0.18857772                      
P1001.1M15 0.29521994 0.44000865           
P1001.1M16 0.22024355 0.36049347 0.09472624

RAM documentation built on May 2, 2019, 3:04 p.m.