Displaying 3 results from an estimated 3 matches for "lambdac".
Did you mean:
lambda
2011 Dec 19
1
Calculating the probability of an event at time "t" from a Cox model fit
...m able to get the
probability of a event at time point(t).
I need probability score of a event at specific time, using scoring scoring
dataset which will have only covariates and not the response variables.
Here is the sample code:
n = 1000
beta1 = 2; beta2 = -1;
lambdaT = .02 # baseline hazard
lambdaC = .4 # hazard of censoring
x1 = rnorm(n,0)
x2 = rnorm(n,0)
# true event time
T = rweibull(n, shape=1, scale=lambdaT*exp(-beta1*x1-beta2*x2))
C = rweibull(n, shape=1, scale=lambdaC) #censoring time
time = pmin(T,C) #observed time is min of censored and true
event = time==T # set to 1 if even...
2012 Dec 13
2
simulate time data
Hi,
Does anyone know how to write a command to generate time-to-event data for Cox's regression?
Scomet
[[alternative HTML version deleted]]
2012 Jan 17
1
Scoring using cox model: probability of survival before time t
...dataset, which will have only
predictor information I am facing some issues. It would be great help for me
if you tell me where am I going wrong!
Here is the sample script!
#########################################################
library(survival)
n = 100
beta1 = 3; beta2 = -2;
lambdaT = .01
lambdaC = .6
x1 = rnorm(n,0)
x2 = rnorm(n,0)
T = rweibull(n, shape=1, scale=lambdaT*exp(-beta1*x1-beta2*x2))
C = rweibull(n, shape=1, scale=lambdaC)
time = pmin(T,C)
event = time==T
train_sample=data.frame(time,event,x1,x2)
rm(time,event,x1,x2)
fit_coxph <- coxph(Surv(time, event)~ x1 +...