# NOT RUN {
# Example 1: Two variables (A default in control simulating dataset)
mydata=simon()
# Example 2: Three variables and Inew=5 out of control batches
B1=matrix(c(-0.3,0,0.4,0,0.2,0,0,-0.1,0.5),3,byrow=TRUE)
B1new=matrix(c(0.1,0,0.4,0,0.2,0,0,-0.1,0.5),3,byrow=TRUE)
mydata1=simon(n=100,I=200,size=3,Inew=5,n1=50,B1,varcov=diag(3),B1new)
# Example 3: Three variables and one Inew=1 out of control batch
B1=matrix(c(-0.3,0,0.4,0,0.2,0,0,-0.1,0.5),3,byrow=TRUE)
B1new=matrix(c(0.1,0,0.4,0,0.7,0,0,-0.1,0.5),3,byrow=TRUE)
mydata2=simon(n=100,I=1,size=3,Inew=1,n1=25,B1,varcov=diag(3),B1new)
plot.ts(t(mydata2$data),main="One in control batch sample")
plot.ts(t(mydata2$newdata),main="One new batch sample")
# }
Run the code above in your browser using DataLab