This package re-implements the first step of the {MASTA} package to extract features from longitudinal encounter records. Compared to {MASTA}, the input data of {IFPCA} is more compact and memory efficent. Click HERE to view input data structure.
Install development version from GitHub.
# install.packages("remotes") remotes::install_github("celehs/IFPCA")
Load the package into R.
library(IFPCA)
library(data.table)
i <- 3 # 1, 2, 3 # time for each code (training + validation) url <- "https://raw.githubusercontent.com/celehs/IFPCA/master/data-raw/" time_code <- fread(paste0(url, "time_code", i, ".csv")) time <- time_code$month names(time) <- time_code$id # follow up time for training and validation sets follow_up_train <- fread(paste0(url, "follow_up_train.csv")) follow_up_valid <- fread(paste0(url, "follow_up_valid.csv")) fu_train <- follow_up_train$fu_time fu_valid <- follow_up_valid$fu_time names(fu_train) <- follow_up_train$id names(fu_valid) <- follow_up_valid$id str(fu_train) str(fu_valid)
system.time(ans <- ifpca(time, fu_train, fu_valid))
data.table(ans$TrainFt) # Extracted Features (Training) data.table(ans$ValidFt) # Extracted Features (Validation)
Wu, S., Müller, H., Zhang, Z. (2013). Functional Data Analysis for Point Processes with Rare Events. Statistica Sinica, 23:1-23. https://doi.org/10.5705/ss.2010.162
Liang, L., Uno, H., Ma, Y., Cai, T. Robust Approach to Event Time Annotation Using Longitudinal Medical Encounters. Working Paper.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.