Z-scores from log2fold change
1
1
Entering edit mode
8.4 years ago

Hi, I am learning to analyze microarray data and was wondering if you can calculate z-scores from log2fold change values in R

microarray • 6.4k views
ADD COMMENT
1
Entering edit mode

The formula for Z-scores is pretty straight-forward (z <- (logratios - mean)/stddev) but it requires a mean and standard deviation that define the distribution of experimental error under the null hypothesis. But we can't know what the null hypothesis is without knowing more. Could you tell us a bit more about the data you're looking at?

ADD REPLY
0
Entering edit mode
8.4 years ago
Benn 8.3k

You can use the scale() function in R. It calculates z-score per column, so if you want z-scores from rows, you'll have to transpose first (and back afterwards).

transposed_matrix <- t(matrix)

z_tr_mt <- scale(transposed_matrix)

z_score <- t(z_tr_mt)
ADD COMMENT

Login before adding your answer.

Traffic: 2727 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