heatmap.2 Z scores
1
0
Entering edit mode
@thomas-hampton-2820
Last seen 10.3 years ago
When you use the scaling capabilities of heatmap.2, the resulting plot heatmap shows a legend that says "Column Z scores" or "Row Z scores". The scaling looks as though the values have been normalized to SD units. z = (x - mean)/sd Is this what heatmap.2 means by a Z score? I am finding it tricky to reproduce their results using the z value above. Best, Tom
• 9.1k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States
Hi Tom, Thomas Hampton wrote: > When you use the scaling capabilities of heatmap.2, the > resulting plot heatmap shows a legend that says > > "Column Z scores" or > > "Row Z scores". > > The scaling looks as though the values have been normalized > to SD units. > > z = (x - mean)/sd > > Is this what heatmap.2 means by a Z score? Yes. From the code for heatmap.2(): if (scale == "row") { retval$rowMeans <- rm <- rowMeans(x, na.rm = na.rm) x <- sweep(x, 1, rm) retval$rowSDs <- sx <- apply(x, 1, sd, na.rm = na.rm) x <- sweep(x, 1, sx, "/") } else if (scale == "column") { retval$colMeans <- rm <- colMeans(x, na.rm = na.rm) x <- sweep(x, 2, rm) retval$colSDs <- sx <- apply(x, 2, sd, na.rm = na.rm) x <- sweep(x, 2, sx, "/") } > > I am finding it tricky to reproduce their results using > the z value above. What are you doing to reproduce the values? Best, Jim > > > Best, > > Tom > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Douglas Lab University of Michigan Department of Human Genetics 5912 Buhl 1241 E. Catherine St. Ann Arbor MI 48109-5618 734-615-7826
ADD COMMENT

Login before adding your answer.

Traffic: 447 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6