Question: samr: understanding scoring line not parallel to diagonal; reproduce example C
0
gravatar for SamGG
3.6 years ago by
SamGG180
France
SamGG180 wrote:

Hi,

As I want to understand why a scoring line on the so-called SAM plot could be not parallel to the diagonal I go back to the doc. There is a similar example, example C p 21.

http://statweb.stanford.edu/~tibs/SAM/sam.pdf

I tried to reproduce it using the given formula (p 19-20), but I don't a similar plot.

I will appreciate any help to understand such a plot or to correct the simulation formula.

Best.

library(samr)
set.seed(0)
nr = 1000
ns = 4
edat = matrix(rnorm(nr*ns*2), nrow = nr)
exC = edat + matrix(c(rep(0, nr*ns), rnorm(nr*ns, mean = 0, sd = 8)), nrow = nr)
heatmap(exC, Rowv = NA, Colv = NA)
exC.sam = samr(list(x = exC[,c(1:3,5,4,6:8)], y = c(rep(1, ns), rep(2, ns)), logged2 = TRUE), resp.type = "Two class unpaired", assay.type = "array")
samr.plot(exC.sam, 0.5)

 

samr • 521 views
ADD COMMENTlink modified 3.6 years ago • written 3.6 years ago by SamGG180
Answer: samr: understanding scoring line not parallel to diagonal; reproduce example C
1
gravatar for SamGG
3.6 years ago by
SamGG180
France
SamGG180 wrote:

Finally, I understood that I overlooked an index in the formula. The simulation aims to add an offset to every row/gene of the second condition, so that every gene is expressed differentially.

exC = edat
exC[,ns+seq(ns)] = exC[,ns+seq(ns)] + rnorm(nr, mean = 0, sd = 4)

Such an effect is still present after row and column centering.

HTH

ADD COMMENTlink written 3.6 years ago by SamGG180
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 228 users visited in the last hour