set.seed(1)
df <- data.frame(
id = rep(1:4, each = 8),
time = rep(1:8, times = 4),
y = c(rnorm(32))
)
# introduce some NAs
df$y[c(3, 11, 20)] <- NA
res <- xtmispanel(df, vars = "y", index = c("id", "time"), detect = TRUE)
Run the code above in your browser using DataLab