if (FALSE) {
# draw a sample for 1000 units and 3 response variable
n <- 1000
TT <- 5
k <- 2
r <- 3 #number of response variables
piv <- c(0.7,0.3)
Pi <- matrix(c(0.9,0.1,0.1,0.9), k, k)
Pi <- array(Pi, c(k, k, TT))
Pi[,,1] <- 0
Mu <- matrix(c(-2,-2,0,0,2,2), r, k)
Si <- diag(r)
out <- drawLMbasiccont(piv, Pi, Mu, Si, n)
data(data_long_cont)
est <- lmestCont(responsesFormula = Y1 + Y2 + Y3 ~ NULL,
index = c("id", "time"),
data = data_long_cont,
k = 3,
modBasic = 1,
tol = 10^-5)
out2 <- drawLMbasiccont(est = est, n = 100, format = "long", seed = 4321)
}
Run the code above in your browser using DataLab