n <- 2500
v <- 4
peou = pmax(t(t(rep.int(-v, n))), pmin(t(t(rt(n, 1, -1))), t(t(rep.int(v, n)))))
peou1 <- peou * 1.1 + rnorm(n, 0, 0.25)
peou2 <- peou * 0.9 + rnorm(n, 0, 0.25)
peou3 <- peou * 0.75 + rnorm(n, 0, 0.25)
pu <- peou + pmax(t(t(rep.int(-v, n))), pmin(t(t(rt(n, 1, -1))), t(t(rep.int(v, n)))))
pu1 <- pu * 1.0 + rnorm(n, 0, 0.25)
pu2 <- pu * 0.9 + rnorm(n, 0, 0.25)
my.data <- data.frame(cbind(peou1, peou2, peou3, pu1, pu2))
names(my.data)=c('peou1', 'peou2', 'peou3', 'pu1', 'pu2')
write.csv(my.data, '~/Teaching/stats/semtutorial/CD/dataset6.csv', row.names=F)
