I want to implement logistic regression with time varying covariates, as the following form of logistic regression:
Which function in R can I use?
My data set looks like this:
ID TSTART TSTOP EVENT x1 x2 x3 x4 x5 1 0 1 0 1.28 0.02 0.87 1.22 0.06 1 1 2 0 1.05 -0.06 0.92 0.73 0.02 1 2 3 1 1.22 -0.06 0.89 0.48 0.01 2 0 1 0 1.06 0.11 0.81 0.84 0.20 2 1 2 0 1.06 0.08 0.88 0.69 0.14 2 2 3 0 0.97 0.08 0.91 0.81 0.17 3 0 1 0 0.87 -0.03 0.79 0.61 0.00 3 1 2 0 0.87 -0.03 0.79 0.61 0.00 3 2 3 1 0.83 -0.14 0.95 0.57 -0.02