# NOT RUN {
oldpar <- par()
oldopt <- options()
data <- DataLongGenerator(n=17, p=6,G=6) # Generate the data
# Let's see the output :
w <- which(data$id==1)
plot(data$time[w],data$Y[w],type="l",ylim=c(min(data$Y),max(data$Y)), col="grey")
for (i in unique(data$id)){
w <- which(data$id==i)
lines(data$time[w],data$Y[w], col='grey')
}
# Let's see the fixed effects predictors:
par(mfrow=c(2,3), mar=c(2,3,3,2))
for (i in 1:ncol(data$X)){
w <- which(data$id==1)
plot(data$time[w],data$X[w,i], col="grey",ylim=c(min(data$X[,i]),
max(data$X[,i])),xlim=c(1,max(data$time)),main=latex2exp::TeX(paste0("$X^{(",i,")}$")))
for (k in unique(data$id)){
w <- which(data$id==k)
lines(data$time[w],data$X[w,i], col="grey")
}
}
par(oldpar)
options(oldopt)
# }
Run the code above in your browser using DataLab