search for: testfm

Displaying 2 results from an estimated 2 matches for "testfm".

Did you mean: testf
2011 Apr 13
3
predict()
Hi, I am experimenting with the function predict() in two versions of R and the R extension package "survival". library(survival) set.seed(123) testdat=data.frame(otime=rexp(10),event=rep(0:1,each=5),x=rnorm(10)) testfm=as.formula('Surv(otime,event)~x') testfun=function(dat,fm) { predict(coxph(fm,data=dat),type='lp',newdata=dat) } # Under R 2.11.1 and survival_2.35-8 testfun(testdat,testfm) > testfun(testdat,testfm) [,1] 1 -0.34786190 2 0.53622182 3 0.07861553 4 0.10...
2011 Apr 13
3
predict()
Hi, I am experimenting with the function predict() in two versions of R and the R extension package "survival". library(survival) set.seed(123) testdat=data.frame(otime=rexp(10),event=rep(0:1,each=5),x=rnorm(10)) testfm=as.formula('Surv(otime,event)~x') testfun=function(dat,fm) { predict(coxph(fm,data=dat),type='lp',newdata=dat) } # Under R 2.11.1 and survival_2.35-8 testfun(testdat,testfm) > testfun(testdat,testfm) [,1] 1 -0.34786190 2 0.53622182 3 0.07861553 4 0.10...