Displaying 1 result from an estimated 1 matches for "startfever".
2012 May 09
0
Survival data with time dependent covariate
...tarted 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
#mentioned sick = 0, if date matches startfever...