search for: hongyuan

Displaying 3 results from an estimated 3 matches for "hongyuan".

2009 Jun 02
1
help on understanding a code
...t0 <- abs(tt0) v <- c(rep(T,m),rep(F,m*B)) v <- v[rev(order(c(att,att0)))] u <- 1:length(v) w <- 1:m p <- (u[v==TRUE]-w)/(B*m) p <- p[rank(-att)] For some reason, I couldn't get any results for p. Maybe R encoded T and F to corresponding numerical ones. Any idea? Thanks, Hongyuan [[alternative HTML version deleted]]
2009 May 31
2
convert the contents of a date.frame to a matrix
...e are negative values in the date.frame, when I use data.matrix(x, rownames.force = NA), the resulting matrix is not the same as the original one. Basically I think R treats the numbers in the date.frame as character and converts it to corresponding numerics. Any idea on this issue? Many Thanks, Hongyuan x[1:3,] ALL ALL.1 ALL.2 ALL.3 ALL.4 ALL.5 ALL.6 ALL.7 ALL.8 ALL.9 ALL.10 ALL.11 2 -214 -139 -76 -135 -106 -138 -72 -413 5 -88 -165 -67 3 -153 -73 -49 -114 -125 -85 -144 -260 -127 -105 -155 -93 4 -58 -1 -307 265 -76 215 238 7 106 42...
2007 May 04
3
Error in if (!length(fname) || !any(fname == zname)) { :
Dear R users, I tried to fit a cox proportional hazard model to get estimation of stratified survival probability. my R code is as follows: cph(Surv(time.sur, status.sur)~ strat(colon[,13])+colon[,18] +colon[,20]+colon[,9], surv=TRUE) Error in if (!length(fname) || !any(fname == zname)) { : missing value where TRUE/FALSE needed Here colon[,13] is the one that I want to stratify and the