graemeleehickey / joineRML

R package for fitting joint models to time-to-event data and multivariate longitudinal data
GNU General Public License v3.0
30 stars 11 forks source link

simulation data for joint modelling of longitudinal and time-to-event #72

Closed navisasadat closed 3 years ago

navisasadat commented 4 years ago

Dear Dr. Hickey, I am Navisa a PhD student in Biostatistics, at Kerman University of Medical Sciences, Iran and for my dissertation I am working on hemodialysis patients to assess the effects of risk factors on patient survival. As part of my dissertation I am trying to conduct a simulation under the following scenario. generate the longitudinal outcome Yij from the following model: Y(ij) =1+ 1×X(1ij,1) + 0×X(1ij,2)+ 3×X(1ij,3)+ 0×X(1ij,4)+ b(li,0)+ b(li,1)× Z(1ij,1)+ b(li,2)×Z(1ij,2)+b(li,3)×Z(1ij,3)+b(li,4)×Z(1ij,4)+εij and the failure time from a Weibull distribution with the hazard function: λi(t)=λ0 (t)×exp(1×x(2i,1) + 0×x(2i,2)+ 0×x(2i,3)+1×x(2i,4)+b(si,0)+b(si,1)×z(2i,1)+b(si,2)×z(2i,2)+b(si,3)×z(2i,3)+b(si,4)×z(2i,4)),

Where λ_0 (t)=2×2.718×t^(α-1) , b(i)~iid N(0,I5), i=1,......,n n is the total of subject

b(li,k)=Γ1× b(i) ,
Γ1=σ × R1,
R1={1;1/2,1/2;0,0,0;1/4,1/4,1/4,1/4;0,0,0,0,0},

b(si,k)=Γ2× b(i)
Γ2=σ × R2
R2={1;1/2,1/2;0,0,0;0,0,0,0;1/5,1/5,1/5,1/5,1/5} ,

σ=0.5

X(1ij,k)~N(0.1) K=1,2,3,4 Z(1ij,k)= X(1ij,k) , and x(2i,k)~N(0.1) K=1,2,3,4 z(2i,k)= x(2i,k) .

where k is the number of independent covariates and j is the order of measurement time for each person. X(1ij,k) are independent covariates with fix effect and Z(1ij,k) are independent covariates with random effect for longitudinal model. x(2i,k) are independent covariates with fix effect and z(2i,k) are independent covariates with random effect for survival model. As I found the function simData in your package " joineRML" very useful regarding simulation data, I would really like to ask if you could guide me how can I generate data according to the mention scenario. Thank you in advance for your time and consideration.

Yours sincerely, Navisa Seyedghsemi

graemeleehickey commented 3 years ago

Thanks. Would suggest writing separate code for this simulation scenario rather than the standard sim tools from this package.