search for: score_data

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

Did you mean: coredata
2011 Dec 19
1
Calculating the probability of an event at time "t" from a Cox model fit
...vent)~ x1 + x2 , method="breslow") library(peperr) predictProb.coxph(fit_coxph, Surv(dataphr$time, dataphr$event), dataphr, 0.003) # Using predictProb.coxph function, probability of event at time (t) is estimated for cox fit models, I want to estimate this probability on scoring dataset score_data as below with covariate x1 and x2. Is it possible/ is there any way to get these probabilities? since in predictProb.coxph function it requires response, which is not preseent on scoring sample. n = 10000 set.seed(1) x1 = rnorm(n,0) x2 = rnorm(n,0) score_data <- data.frame(x1,x2) Thanks in...
2012 Jan 17
1
Scoring using cox model: probability of survival before time t
...probabilities on scoring_data. Now, close the earlier session and run the below script in the new #R session, it gives error. library(survival) library(peperr) load(file = file.path("C:/Desktop","fit_coxph.RData")) n = 1000 set.seed(1) x1 = rnorm(n,0) x2 = rnorm(n,0) score_data <- data.frame(x1,x2) pred_score <- predictProb.coxph(fit_coxph, Surv(time, event), score_data, 0.04) #Error in Surv(time, event) : Time variable is not numeric #After creating dummy place holder for Surv(time, event), it gives another error: time <- rep(2, n) event <- rep(1, n) pre...