Adam Lang
- Overview
- Installation
- Modeling Process
- FitDiseaseProgressionCurve
- Example
- Plots
- Comparison
- Notes
- Citations
The trajectory of a given AD biomarker may take decades, however we are usually limited to much shorter follow up data in ADNI and other AD focused studies. This can impose a challenge when estimating the full course of AD disease progression. Using methodology described in Budgeon et. al [1], we can estimate a full-term disease pathology curve from short term follow up data.
Both FitDiseaseProgressionCurve.R and FitDiseaseProgressionCurveHelpers.R must be downloaded. The following packages must be installed:
install.packages("purrr")
install.packages("plyr")
install.packages("dplyr")
install.packages("stringr")
install.packages("nlme")
install.packages("matrixStats")
install.packages("ggplot2")
install.packages("RConics")
install.packages("zoo")The modeling process to is outlined in detail in Budgeon et. al
FitDiseaseProgressionCurve requires the following arguments:
data (data.frame) a data frame containing:
Outcome of Interest (numeric)
Column ID subject ids (factor)
Column Time_Since_Baseline (numeric) time
since baseline obs
formula.fixed (character) fixed effect formula
(should be “Outcome ~ Time_Since_Baseline”)
formula.random (character) random effect formula
(default is “~1+Time_Since_Baseline|ID”)
n_iter (numeric) number of iterations for
bootstrapping, (default is 1)
n_sample (numeric) proportion of data preserved for
bootstrapping (default is 1)
lme.control (list) lmeControl list for mixed effect
modeling (optional)
individual.lm (logical) use linear models for each
subject instead of one mixed effects model (default is
FALSE)
seq.by (numeric) # of times to integrate along
polynomial domain (default is 1000)
FitDiseaseProgressionCurve Returns a list with the following objects:
Function_Arguments (list) A list of the arguments
specified in the model fitting
Model_Output (list) A list with:
Model_Data (data.frame) data of estimated population
model
Model_Plot (ggplot) plot of estimated population model
Mean_Slope_Output (list) A list with:
Mean_Slope_Data (data.frame) data of estimated means
vs. slopes
Mean_Slope_Plot (ggplot) plot of estimated means
vs. slopes
IntegrationBounds (list) A list with:
direction (character) whether the model is increasing or
decreasing (positive or negative)
roots.frame (data.frame) a data.frame with the
integration start and end points
Here we will generate simulated data to show model fitting process
#Functions for simulating data in SimulationFunctions.R
set.seed(123)
#generate data based on sigmoid curve
example.data.list <- construct.simulated.dataset(0.4, 13, .01, .98, 20, seq(0,25,.1),
length.subj = 3, start.sim = 51, eps = 0.5, id.start = 1)Example of data frame for model
data <- example.data.list$data
knitr::kable(data[1:14,])| Time_Since_Baseline | Simulated_Response | ID |
|---|---|---|
| 0.0 | 0.0099764 | 1 |
| 0.5 | 0.0099843 | 1 |
| 1.0 | 0.0099923 | 1 |
| 1.5 | 0.0100002 | 1 |
| 2.0 | 0.0100082 | 1 |
| 2.5 | 0.0100161 | 1 |
| 3.0 | 0.0100240 | 1 |
| 0.0 | 0.0099753 | 2 |
| 0.5 | 0.0099876 | 2 |
| 1.0 | 0.0099999 | 2 |
| 1.5 | 0.0100123 | 2 |
| 2.0 | 0.0100246 | 2 |
| 2.5 | 0.0100369 | 2 |
| 3.0 | 0.0100492 | 2 |
set.seed(123)
model.fit <- FitDiseaseProgressionCurve(data = data,
formula.fixed = "Simulated_Response ~ Time_Since_Baseline",
formula.random = "~1 + Time_Since_Baseline|ID",
n_iter = 200,
n_sample = .75,
seq.by = 1000,
verbose = FALSE,
individual.lm = FALSE) Estimated population model
model.fit$Model_Output$Model_PlotPopulation sigmoidal curve that we will base our data generating process on
Longitudinal subject data generated based on our sigmoidal curve with noise introduced
Subjects realigned so that baseline is T=0
Here the red curve is the population sigmoid curve we generated and the black curve is the population curve estimated in the model.
The length of the domain is data dependant, as the origin of the curve begins at the smallest observed mean in the data. However, the main utility of the disease progression curve is to estimate the time between disease states, so the origin of the model and the total time span of the model is unimportant.
[1] Budgeon, Charley et al. “Constructing longitudinal disease progression curves using sparse, short-term individual data with an application to Alzheimer’s disease.” Statistics in medicine 36 17 (2017): 2720-2734 .
[2] Lionel Henry and Hadley Wickham (2019). purrr: Functional Programming Tools. R package version 0.3.2. https://CRAN.R-project.org/package=purrr
[3] Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, 40(1), 1-29. URL http://www.jstatsoft.org/v40/i01/.
[4] Hadley Wickham, Romain François, Lionel Henry and Kirill Müller (2021). dplyr: A Grammar of Data Manipulation. R package version 1.0.7. https://CRAN.R-project.org/package=dplyr
[5] Pinheiro J, Bates D, DebRoy S, Sarkar D, R Core Team (2021). nlme: Linear and Nonlinear Mixed Effects Models. R package version 3.1-153, <URL: https://CRAN.R-project.org/package=nlme>.
[6] Hadley Wickham (2019). stringr: Simple, Consistent Wrappers for Common String Operations. R package version 1.4.0. https://CRAN.R-project.org/package=stringr
[7] Henrik Bengtsson (2020). matrixStats: Functions that Apply to Rows and Columns of Matrices (and to Vectors). R package version 0.57.0. https://CRAN.R-project.org/package=matrixStats
[8] H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.
[9] Emanuel Huber (2014). RConics: Computations on Conics. R package version 1.0. https://CRAN.R-project.org/package=RConics
[10] Achim Zeileis and Gabor Grothendieck (2005). zoo: S3 Infrastructure for Regular and Irregular Time Series. Journal of Statistical Software, 14(6), 1-27. doi:10.18637/jss.v014.i06




