T Plot Method



A visualization of a correlation matrix.
  • Maybe this is the same reason that the graphical method is off. When I plot T 2 vs. M, I did a normal linear regression. This takes all the data and find the linear function that best fits the.
  • Method 'pie' and 'shade' came from Michael Friendly's job (with some adjustment about the shade added on). Don't plot confidence interval. If 'rect', plot rectangles whose upper side means upper bound and lower side means lower bound, respectively, and meanwhile correlation coefficients are also added on the rectangles. If 'circle', first.

A graphical display of a correlation matrix, confidence interval. The detailsare paid great attention to. It can also visualize a general matrix bysetting is.corr = FALSE.

T-plot, BJH, pore volume calculations Cross-sectional area Size of a nitrogen molecule BET, Langmuir, BJH, HK Hard sphere diameter pressure correction for micro pore analyses je.kenvin@micromeritics.com Surface area and porosity.

Usage
Arguments
corr

The correlation matrix to visualize, must be square iforder is not 'original'. For general matrix, please usingis.corr = FALSE to convert.

method

Character, the visualization method of correlation matrix to be used. Currently, it supports seven methods, named 'circle' (default), 'square', 'ellipse', 'number', 'pie', 'shade' and 'color'. See examples for details.

The areas of circles or squares show the absolute value of corresponding correlation coefficients. Method 'pie' and 'shade' came from Michael Friendly's job (with some adjustment about the shade added on), and 'ellipse' came from D.J. Murdoch and E.D. Chow's job, see in section References.

type

Character, 'full' (default), 'upper' or'lower', display full matrix, lower triangular or upper triangularmatrix.

add

Logical, if TRUE, the graph is added to an existing plot,otherwise a new plot is created.

col

Vector, the color of glyphs. It is distributed uniformly incl.lim. If NULL, col will becolorRampPalette(col2)(200), see example about col2.

bg

The background color.

title

Character, title of the graph.

is.corr

Logical, whether the input matrix is a correlation matrix ornot. We can visualize the non-correlation matrix by settingis.corr = FALSE.

diag

Logical, whether display the correlation coefficients on theprincipal diagonal.

outline

Logical or character, whether plot outline of circles, squareand ellipse, or the color of these glyphs. For pie, this represents thecolor of the circle outlining the pie. If outline is TRUE,the default value is 'black'.

mar

See par.

addgrid.col

The color of the grid. If NA, don't add grid. IfNULL the default value is chosen. The default value depends onmethod, if method is color or shade, the colorof the grid is NA, that is, not draw grid; otherwise 'grey'.

addCoef.col

Color of coefficients added on the graph. If NULL(default), add no coefficients.

addCoefasPercent

Logic, whether translate coefficients into percentagestyle for spacesaving.

order

Character, the ordering method of the correlation matrix.

  • 'original' for original order (default).

  • 'AOE' for the angular order of the eigenvectors.

  • 'FPC' for the first principal component order.

  • 'hclust' for the hierarchical clustering order.

  • 'alphabet' for alphabetical order.

See function corrMatOrder for details.

hclust.method

Character, the agglomeration method to be used whenorder is hclust. This should be one of 'ward','ward.D', 'ward.D2', 'single', 'complete','average', 'mcquitty', 'median' or 'centroid'.

addrect

Integer, the number of rectangles draws on the graph accordingto the hierarchical cluster, only valid when order is hclust.If NULL (default), then add no rectangles.

rect.col

Color for rectangle border(s), only valid when addrectis equal or greater than 1.

rect.lwd

Numeric, line width for borders for rectangle border(s), onlyvalid when addrect is equal or greater than 1.

tl.pos

Character or logical, position of text labels. If character, itmust be one of 'lt', 'ld', 'td', 'd' or'n'. 'lt'(default if type'full') means left and top,'ld'(default if type'lower') means left and diagonal,'td'(default if type'upper') means top and diagonal(near),'d' means diagonal, 'n' means don't add textlabel.

tl.cex

Numeric, for the size of text label (variable names).

tl.col

The color of text label.

tl.offset

Numeric, for text label, see text.

tl.srt

Numeric, for text label string rotation in degrees, seetext.

cl.pos

Character or logical, position of color labels; If character,it must be one of 'r' (default if type'upper' or'full'), 'b' (default if type'lower') or 'n','n' means don't draw colorlabel.

cl.lim
T Plot Method

T Plot Method Bet

The limits (x1, x2) in the colorlabel.

Wilson Plot Method

cl.length

Integer, the number of number-text in colorlabel, passed tocolorlegend. If NULL, cl.length islength(col) + 1 when length(col) <=20; cl.length is 11when length(col) > 20

cl.cex

Numeric, cex of number-label in colorlabel, passed tocolorlegend.

Wilson plot method
cl.ratio

Numeric, to justify the width of colorlabel, 0.1~0.2 issuggested.

cl.align.text

Character, 'l', 'c' (default) or'r', for number-label in colorlabel, 'l' means left,'c' means center, and 'r' means right.

cl.offset

Numeric, for number-label in colorlabel, seetext.

number.cex

The cex parameter to send to the call to textwhen writing the correlation coefficients into the plot.

number.font

the font parameter to send to the call totext when writing the correlation coefficients into the plot.

number.digits

indicating the number of decimal digits to beadded into the plot. Non-negative integer or NULL, default NULL.

addshade

Character for shade style, 'negative','positive' or 'all', only valid when method is'shade'. If 'all', all correlation coefficients' glyph willbe shaded; if 'positive', only the positive will be shaded; if'negative', only the negative will be shaded. Note: the angle ofshade line is different, 45 degrees for positive and 135 degrees fornegative.

shade.lwd

Numeric, the line width of shade.

T Plot Method
shade.col

The color of shade line.

p.mat

Matrix of p-value, if NULL, arguments sig.level,insig, pch, pch.col, pch.cex is invalid.

sig.level

T Plot Method Crossword

Significant level, if the p-value in p-mat is biggerthan sig.level, then the corresponding correlation coefficient isregarded as insignificant. If insig is 'label_sig', this maybe an increasing vector of significance levels, in which case pchwill be used once for the highest p-value interval and multiple times(e.g. '*', '**', '***') for each lower p-value interval.

insig

Character, specialized insignificant correlation coefficients,'pch' (default), 'p-value', 'blank', 'n', or'label_sig'. If 'blank', wipe away the corresponding glyphs;if 'p-value', add p-values the corresponding glyphs;if 'pch', add characters (see pch for details) oncorresponding glyphs; if 'n', don't take any measures; if'label_sig', mark significant correlations with pch(see sig.level).

pch

Add character on the glyphs of insignificant correlationcoefficients(only valid when insig is 'pch'). Seepar.

pch.col

The color of pch (only valid when insig is'pch').

pch.cex

The cex of pch (only valid when insig is 'pch').

plotCI

Character, method of ploting confidence interval. If'n', don't plot confidence interval. If 'rect', plot rectangleswhose upper side means upper bound and lower side means lower bound,respectively, and meanwhile correlation coefficients are also added on therectangles. If 'circle', first plot a circle with the bigger absolutebound, and then plot the smaller. Warning: if the two bounds are the samesign, the smaller circle will be wiped away, thus forming a ring. Method'square' is similar to 'circle'.

lowCI.mat

Matrix of the lower bound of confidence interval.

uppCI.mat

Matrix of the upper bound of confidence interval.

na.label

Label to be used for rendering NA cells. Default is'?'. If 'square', then the cell is rendered as a square with thena.label.col color.

na.label.col

Color used for rendering NA cells. Default is'black'.

win.asp

Aspect ration for the whole plot. Value other than 1 iscurrently compatible only with methods 'circle' and 'square'.

Additional arguments passing to function text for drawingtext lable.

Details

corrplot function offers flexible ways to visualize correlation matrix, lower and upper bound of confidence interval matrix.

Value

(Invisibly) returns a reordered correlation matrix.

Note

Cairo and cairoDevice packages is strongly recommended to produce high-quality PNG, JPEG, TIFF bitmap files, especially for that methodcircle, ellipse.

Row- and column names of the input matrix are used as labels rendered in the corrplot. Plothmath expressions will be used if the name is prefixed by one of the following characters: :, = or $. For example ':alpha + beta'.

References

Michael Friendly (2002).Corrgrams: Exploratory displays for correlation matrices.The American Statistician, 56, 316--324.

D.J. Murdoch, E.D. Chow (1996).A graphical display of large correlation matrices.The American Statistician, 50, 178--180.

See Also

Function plotcorr in the ellipse package and corrgram in the corrgram package have some similarities.

Package seriation offered more methods to reorder matrices, such as ARSA, BBURCG, BBWRCG, MDS, TSP, Chen and so forth.

Aliases
  • corrplot
Examples
Documentation reproduced from package corrplot, version 0.84, License: GPL

Community examples

API documentation