View source: R/create_missings.R
create_missings | R Documentation |
Create Missings for Approximation of Continuous Time Dynamic Models (new version)
create_missings(data, tinterval, id, time, btw_vars = NULL)
data |
An object of class |
tinterval |
The step interval for approximation for a continuous time DSEM. The smaller the step interval, the better the approximation. |
id |
The variable in |
time |
The variable in |
btw_vars |
The names of between-level variables in the data to be added in newly created rows with NAs. |
A data.frame
with missings imputed for use in mlts_fit
.
# create some data for example
data <- data.frame(
id = rep(c(1, 2), each = 4),
time = c(0, 3, 4, 6,
1, 4, 5, 7)
)
# create missings to approximate continuous time process
create_missings(
data = data, id = "id", time = "time",
tinterval = 1 # use time interval of 1 minute
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.