[R] Flipping a heatmap

Michael Friendly friendly at yorku.ca
Fri Sep 12 15:45:36 CEST 2003


On Thu, 11 Sep 2003 07:46:16 -0400, Duncan Murdoch wrote

>>>My feeling is that heatmap is not the right thing to use on a correlation
>>>matrix.  The heatmap function expects a data matrix, and does a two-way
>>>clustering of cases and variables.  It tries to rearrange the rows and
>>>columns so that similar colors are closer together.  This obviously will not
>>>work for a correlation matrix.  
>
>
>There are several different ways you might organize the rows and
>columns of a correlation matrix, but rearranging it to put equal
>correlations together sounds like one sensible idea.  You'd probably
>want row and column labels rather than the dendrogram heatmap() puts
>on, but other than that, it seems like a nice idea to me.
>
>Duncan Murdoch
>

My American Statistician paper,
@Article{Friendly:02:corrgram,
  author =       "M. Friendly",
  year =         "2002",
  journal = TAS,
  volume = 56,
  number = 4,
  pages = "316--324",
  title =        "Corrgrams: Exploratory displays for correlation matrices",
  url =          "http://www.math.yorku.ca/SCS/Papers/corrgram.pdf",
}


defines a simple scheme for reordering a correlation matrix 
(or R^-1, for conditional independence) based
on angles of the first two eigenvectors.  A variety
of rendering schemes is also described. 
There's a SAS macro at

  *     Doc: http://www.math.yorku.ca/SCS/sasmac/corrgram.html   *



-- 
Michael Friendly     Email: friendly at yorku.ca 
Professor, Psychology Dept.
York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street    http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT  M3J 1P3 CANADA




More information about the R-help mailing list