Assume that we collect below data : - subjects = 20 males + 20 females, every single individual is independence, and difference events = 1, 2, 3... n covariates = 4 blood types A, B, AB, O http://r.789695.n4.nabble.com/file/n4245397/CodeCogsEqn.jpeg ?m = hazards rates for male ?n = hazards rates for female Wm = Wn x ?, frailty for males, where ? is the edge ratio of male compare to female Wn = frailty for females X = covariates, blood types effects ? = coefficients of blood types I would like to apply frailty model to get below results:- 1) 1 edge ratio between male and female ? 2) 4 coefficient values of blood types ? Under this situation, shall I use which package (coxme or frailtypack)? will coxme function able to cope with it? -- View this message in context: http://r.789695.n4.nabble.com/Joint-modelling-of-survival-data-tp4245397p4245397.html Sent from the R help mailing list archive at Nabble.com.
--- begin included messge ---
Assume that we collect below data : -
subjects = 20 males + 20 females, every single individual is
independence,
and difference
events = 1, 2, 3... n
covariates = 4 blood types A, B, AB, O
http://r.789695.n4.nabble.com/file/n4245397/CodeCogsEqn.jpeg
?m = hazards rates for male
?n = hazards rates for female
Wm = Wn x ?, frailty for males, where ? is the edge ratio of male
compare to
female
Wn = frailty for females
X = covariates, blood types effects
? = coefficients of blood types
I would like to apply frailty model to get below results:-
1) 1 edge ratio between male and female ?
2) 4 coefficient values of blood types ?
Under this situation, shall I use which package (coxme or frailtypack)?
will coxme function able to cope with it?
--------- end inclusion -------
Could you clarify your question? First, the above is rather hard to
read with all the misisng symbols.
Now coxme fits the model
\lambda_i(t) = \lambda_0(t) exp(X beta + Z b)
b ~ N(0, A)
beta = fixed effects coef X = covariate matrix for fixed effects
b= random effects coefs, Z= covariate matrix for random effects
(Bear with the latex-like notation, at least it's simple text for a
mailer).
There are several possible models of interest for your data:
No random effect: coxph(Surv(time, status) ~ bloodtype + sex)
Random sex effect: coxme(Surv(time, status) ~ bloodtype + (1|sex))
But does your data set have multiple events per subject? (I'm not sure
what you mean by "difference events".) If it does then neither of the
above is good, since they do not account for correlation within subject.
The simple Cox model is easy to correct by adding "+ cluster(id)" to
the
model where id is a variable that identifies individual subjects. The
random effect model needs to have a per-subject random effect.
That leads to two more models
fixed sex effect + random subject effect
random subject effect, but with different variance for the males &
females.
What are you trying to do?
Terry Therneau
Hi Dr Terry,
Thank you for your reply.
Step(1) ----- Lets assume Generalized Poisson model (GLM) as basic model
where constant hazards ratio as time goes by. Below are two correlated GLM.
X_ij = Poisson( lambda_1 = \gamma * \alpha_i * \delta_j )
Y_ij = Poisson( lambda_2 = \alpha_j * \delta_i )
X_ij { 0, 1, 2 } and Y_ij { 0, 1, 2 }
Where i is not equal to j , \alpha and \delta are unknown parameters.
mean of production between \alpha with \delta constraint to 1 (will be
random effects in below survival model)
\gamma is a constant parameter (might be an intercepts in GLM)
Therefore we need to make data size from n to be 2*n to get the
coefficient value of \alpha and \delta , as well as \gamma.
Step(2) ----- A Cox proportional hazards model.
\lambda(t) = \lambda_0(t) * exp( X * \beta )
\lambda_0(t) is baseline hazards function , X is covariate , \beta is
coefficient value.
If I would extend static hazards ratio from Step(1) :-
\lambda_1k(t) = exp( \gamma * \alpha_ik * \delta_jk )
\lambda_2k(t) = exp( * \alpha_jk * \delta_ik )
Where k is a group, and between groups are all independence. k = 1,2,3...
n (n is data size in Step1)
Below are fixed effects, X_ij { 0, 1, 2 } and Y_ij { 0, 1, 2 } will below
9 parameters. Then 9 coefficient values for \lambda_1(t) and also 9 for
\lambda_2(t) where X_00 for both \lambda_1(t) and \lambda_2(t) as 1:-
01) hazards ratio during X_ij = 0 & Y_ij = 0 (terms as \lambda_00
with factor( X_00 ))
02) hazards ratio during X_ij = 0 & Y_ij = 1 (terms as \lambda_01
with factor( X_01 ))
03) hazards ratio during X_ij = 0 & Y_ij = 2 (terms as \lambda_02
with factor( X_02 ))
04) hazards ratio during X_ij = 1 & Y_ij = 0 (terms as \lambda_10
with factor( X_10 ))
05) hazards ratio during X_ij = 1 & Y_ij = 1 (terms as \lambda_11
with factor( X_11 ))
06) hazards ratio during X_ij = 1 & Y_ij = 2 (terms as \lambda_12
with factor( X_12 ))
07) hazards ratio during X_ij = 2 & Y_ij = 0 (terms as \lambda_20
with factor( X_20 ))
08) hazards ratio during X_ij = 2 & Y_ij = 1 (terms as \lambda_21
with factor( X_21 ))
09) hazards ratio during X_ij = 2 & Y_ij = 2 (terms as \lambda_22
with factor( X_22 ))
Step(3) ----- Fit correlated random effects into proportional hazards model.
Due to
\lambda_1(t) = \lamda_0(t) * exp( X * \beta ) exp( Z * b )
\lambda_2(t) = \lamda_0(t) * exp( X * \beta ) exp( Z * b )
\lambda_0(t) is baseline hazards function , X are covariates include {
X_00, X_01... X_22 }.
b ~ N(0, A)
\beta = fixed effects coef X = covariate matrix for fixed effects
b= random effects coefs, Z= covariate matrix for random effects
*** Question : (1) How do I fit above \gamma , \alpha and \delta as
random effects?
(2) Under this situation, personally believe
that \gamma should be intercept where require a parametric survreg() model
but not coxme(). However I am not sure am I right? Since \lambda_1(t) and
\lambda_2(t) are sharing same \alpha and \delta coefficient values but only
\lambda_1(t) has extra \gamma value...
Thank you.
Best,
Ryusuke
--
View this message in context:
http://r.789695.n4.nabble.com/Joint-modelling-of-survival-data-tp4245397p4264703.html
Sent from the R help mailing list archive at Nabble.com.