Displaying 1 result from an estimated 1 matches for "data2010".
Did you mean:
data201
2012 May 09
0
Survival data with time dependent covariate
...d
a variable that tells me whether the person got a fever that day, like this:
start stop fever
2011-04-11 2011-04-12 0
2011-04-12 2011-04-13 0
I already started to write a piece of code for this:
survival = as.numeric(NULL, NULL, 3)
for(i in 1:nrow(data2010)) {
start = data$date[i]; #first date
stop = data$date[i] + 86400; #first date plus 1 day (day is in seconds)
sick = if(is.na(data[i, 7])) { 0 } else if (stop == data[i,7]){ 1 } else 0;
#if startfever is NA or date is not the same as...