Hi - I am trying to develop a reasonable understanding of the data manipulations in ADNIMERGE, as described in the 'Progressions' PDF, copied at the link here
Hopefully the following is due to my poor understanding of something, but any clarifications welcome.....
I was (and am) confused by the output object 'dd_all_int_final_3', which sometimes results in constant (and therefore overlapping) start times for different transitions, rather than what I might have expected of one transition per start/stop time period. This can be seen by inspection of 'dd_all_int_final_3' (or 'dd3'), where the same start time occurs more than once....
id start stop start.stage end.stage
1 2 6.03 7.05 1 3
2 2 6.03 8.00 3 1
3 2 6.03 10.04 1 0
or a more complex and perhaps better example:
id start stop start.stage end.stage
98 112 0.00 0.482 3 1
99 112 0.00 1.016 1 3
100 112 1.49 1.990 3 1
101 112 3.99 4.969 1 3
102 112 3.99 5.960 3 1
103 112 3.99 6.976 1 3
104 112 7.98 9.292 3 0
I attempted to 'fix' this to exemplify what I was expecting.
The function call 'make_all_intermediate_trans' makes use of 'myFunctions.R' (part of the package download). My attempted exploratory fix is shown bold below (along with some of my added comments, and a wee bit formatting for clarity)....
...
if(subdd$stage[j] != start.stage){ ## if not same stage
dd2 <- rbind(dd2, c(id = rid,
start = start,
stop = subdd$Year[j],
start.stage = start.stage,
end.stage = subdd$stage[j]))
start.stage <- subdd$stage[j] ## reset stage datum
start <- subdd$Year[j] ## reset time datum - DEBUG??
}else{
start <- subdd$Year[j]
}
...
For my previous second case, this gives a non-overlapping time slot sequence, as shown below.
id start stop start.stage end.stage
98 112 0.000 0.482 3 1
99 112 0.482 1.016 1 3
100 112 1.489 1.990 3 1
101 112 3.989 4.969 1 3
102 112 4.969 5.960 3 1
103 112 5.960 6.976 1 3
104 112 7.975 9.292 3 0
Does this have any merit??
Please feel free to let me know if I have inadvertently missed any essential information needed to satisfactorily progress any discussion.
Regards and thanks,
Dave