Hello everyone,
I am doing a Cox regression with time dependent covariates. I have 2
queries.
In this hypothetical example, I have the following data:
age sex time death
1 0 2 0
0 1 2 0
0 0 2 1
0 0 3 0
1 0 3 1
1 1 3 1
1 0 4 1
1 0 5 1
1 0 6 0
0 0 7 0
1 1 10 1
0 1 12 0
0 0 12 1
1 0 21 0
0 1 21 0
0 0 21 1
1 0 22 1
0 1 33 1
0 1 45 1
0 1 55 1
0 0 67 1
The model is generated with values for the parameters as:
Age: 1.650
Sex: 0.086
T_Cov*age: -0.015
Question 1)
Survival functions and hazard functions are calculated at the means.
These means are quoted as:
Covariate Means
Age: 0.321
T_Cov: 10.518
Sex: 0.455
T_Cov*age: 1.866
How are these covariate means calculated using the data above? It is
not simply an average of the appropriate columns.
2) If the baseline survival function at time 2 months is 0.0171 and I
wanted to calculate the value of the hazard function at this time for a
person with age=1 and sex=1, would it just be a case of using the
predictor:
1.650age + 0.086sex -0.015 t_cov *age = z
i.e. (1.650 * 1) + (0.086 * 1) + (-0.015*(2 * 1)) = 1.706
to generate the hazard function value: 0.0171*e^(1.706) =0.0942
Many thanks,
Kim.
|