Description Usage Arguments Value Author(s) Examples
Read in glucose data and calculate pseudo admission episodes, calculate the time interval between consecutive readings and accumulated time intervals within each episode for each individual, identify the day in a week, month, year, week number in a year, convert timings into hours using the standard 24-hour clock.
1 | GenEpisode(dat, epiMethod = "Admininfo")
|
dat |
A data.frame with at least have three key variables:
|
epiMethod |
This indicates the method takes to compute episodes. If
|
The input data.table with the following additional variables:
LOS.EACH |
time difference between readings |
LOS.PSUM |
cumulative time differences between readings |
EPISODE.ID |
In the case of pseudo, admission times will be increase by 1 if LOS.EACH greater than 48 hours. Otherwise, it will always be 1, corresponding to that each admission id identifies one hospital stay. |
mond |
day of month |
weekd |
day of week |
yday |
day of year |
hour |
numerical hours |
weekn |
number of weeks in a year |
These variables are created using original key variable RESULT.DATE
.
Chuen Seng Tan, Ying Chen
1 2 3 4 5 6 | # Load example data
data("gluDat")
# Focus on data from Ward A. Process date-time variable and blood glucose readings:
gluDat2 <- FormatDate(dat = gluDat[gluDat$LOCATION == "A", ], yy = 2020, mm = 7)
# Specify admission episodes based on admission ID:
gluDat3 <- GenEpisode(dat = gluDat2, epiMethod = "Admininfo")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.