Description Usage Arguments Value Examples
View source: R/interpolate_date.R
Interpolate kidney function via a linear mixed effects model
1 | interpolate_date(fit, egfr, id, origin, time_scale)
|
fit |
A mixed model fitted using |
egfr |
Interpolation identifies the date at which |
id |
Name of the ID variable used to identify each study subject. |
origin |
Origin of the time scale. Can be a vector of dates or a single value. |
time_scale |
Time scale used for the calculations; can be either |
A data frame with a row per subject and a column per egfr
value.
1 2 3 4 5 6 7 8 9 | df <- simulate_long_egfr(n = 100)
model <- lme4::lmer(egfr ~ time + (time | lopnr), data = df)
interpolate_date(
fit = model,
id = "lopnr",
egfr = c(60, 30),
origin = as.Date("2006-01-01"),
time_scale = "years"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.