Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. set.seed(23)
  2. a<-aregImpute(formula1, data=somedata, n.impute=5)
  3. f<-fit.mult.impute(Surv(ptime2, pstatus2) ~ formula2, cph, a, data=somedata #formula2 has the same terms as formula1, save 2 exceptions 1) ptime2 and pstatus2 are not in formula2 2) some continuous terms have rcs(*,3) functions around them.
  4. p1<-plot(f,conf.int=T,ref.zero=T,fun=exp,age=c(18:70),xlab=c("Recipient age"),ylab=c("RR of Mortality"))
  5. write.table(p1$x.xbeta,file=afilename,sep=",",dimnames.write=F)
  6.  
  7. set.seed(23)
  8. a<-aregImpute(formula1, data=somedata, n.impute=5)
  9. f<-fit.mult.impute(Surv(ptime2, pstatus2) ~ formula2, cph, a, data=somedata #formula2 has the same terms as formula1, save 2 exceptions 1) ptime2 and pstatus2 are not in formula2 2) some continuous terms have rcs(*,3) functions around them.
  10. p2<-Predict(f ,age ,conf.int=T ,ref.zero=T ,fun=exp )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement