title: "Possible Data Structures" output: html_document: keep_md: yes toc: yes toc_depth: 5
| client id| referral id| referral date| removal begin date| removal end date| | -------- | ---------- | ------------ | ----------------- | --------------- | | 1| 1| 2014-01| - | - | | 1| 1| 2014-01| 2014-02| 2014-04| | 1| 2| 2015-01| 2015-02| 2015-06| | 1| 3| 2016-01| - | - | | | | | | | | 2| 4| 2014-01| - | - | | 2| 5| 2014-07| 2014-08| 2014-10| | 2| 6| 2015-01| 2015-03| - | | | | | | | | 3| 7| 2014-01| - | - | | 3| 8| 2015-01| - | - | | | | | | | | 4| 9| 2015-01| - | - | | | | | | | | 5| 10| 2014-08| 2014-11| 2014-12|
(Transformed for just client 1 above)
| client id | span index | start date | start event | stop date | stop event | state | iss | |-----------|------------|------------|---------------|-----------|---------------|-------|-----| | 1 | 1 | 2014-01 | referral | 2014-02 | removal | in | n | | 1 | 2 | 2014-02 | removal | 2014-04 | reunification | out | y | | 1 | 3 | 2014-04 | reunification | 2015-01 | referral | in | n | | 1 | 4 | 2015-01 | referral | 2015-02 | removal | in | y | | 1 | 5 | 2015-02 | removal | 2015-06 | reunification | out | y | | 1 | 6 | 2015-06 | reunification | 2016-01 | referral | in | n | | 1 | 7 | 2016-01 | referral | + | censored | in | y |
start_date
, start_event
, stop_date
, stop_event
, and state
duration
duration_censored
duration_exposed_cumulative
(ie, running tally of removed duration)removal_tally
(ie, running tally of how many times client's been removed at that point)duration_exposed
duration_removed
survival
package vignette: "Multi-state models and competing risks" https://cran.r-project.org/web/packages/survival/vignettes/compete.pdfS:/BBMC/literature/dhs/survival/putter-fiocco-geskus-2007-competing-risks-and-multistate-models.pdf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.