Hello,
Where is the problem in this programming. I want two way matrix, but it gives
problem.
The program is given below:
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 data
c
= cens
tab
= cbind(t, c)
#
Resampling Time and Censoring
cc sample(c, replace = TRUE) #
Bootstrap WR Censoring Data
tt sample(t, replace = TRUE) #
Bootstrap WR Time Data
xx Surv(tt,
cc)
#
Survival Times with Censored
P = predic[,1:5] #
First 5 Rows of predic
n =
310
#
Every Row has 310 values
ma matrix(P, n) #
P cross n, matrix
boot <- sample(seq(n), replace=TRUE) #
Bootstrap WR in seq(n)
genes5 = ma[boot, ] # 5
genes Bootstrap
Matrix
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]
}
Thanks in advance.
Regards
Fazli Raziq
[[alternative HTML version deleted]]
