Hello,

Where is the problem in this programming. I want two way matrix, but it gives 
problem.
The program is given below:

Thanks in advance.

Regards
Fazli Raziq


rep = 2
genes = 5
pred = c()
iter   = array (dim = c(rep, pred))
pred = array(dim = c(1, genes))
m = c()
l = 1
w = 1
for(m in 1:rep) {
t = time
c = cens
tab = cbind(t, c)

# Resampling Time and Censoring
cc = sample(c, replace = TRUE)
tt = sample(t, replace = TRUE)
xx = Surv(tt, cc)

P = predic[,1:5]
n = 310
ma = matrix(P, n)
boot <- sample(seq(n), replace=TRUE)
genes5 = ma[boot, ]


for(p in 1: genes){
i = c()

for(i in w:l) {
z = genes5[,w: l]
y = coxph(xx ~ z)

}
Pval = summary(y) $ coeff[, 5]

if( any(Pval <= 0.01) ) sign <- 1 else sign <- 0
pred[1, p] = sign[1]
}

iter [m, 1:5] = pred[1: 5]

}
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to