set.seed(123)
# Number of predictors
P <- 10
# Sample size
N <- 10000
# Generate variance covariance matrix as toeplitz
V <- toeplitz(P:1/P)
# Relative size of coefficientsx1 <- runif(1000, 0, 15)
x2 <- sin(x1) + rnorm(1000, 0, 0.5)
y <- x1 + x2 + rnorm(1000)
amp <- mice::ampute(data.frame(x1 = x1, x2 = x2, y = y), prop = 0.9, patterns = matrix(c(0, 1, 1,1,0,1,0,0,1), nrow = 3, byrow=TRUE))
fitcc <- lm(y ~ x1+x2, amp$amp)
imp <- mice::mice(amp$amp, m = 200, method = "norm", print = FALSE)OlderNewer