n <- 10000
quality <- rnorm(n, 0, 1)
peou <- quality * 1.2 + rnorm(n, 0, 0.15)
pu <- quality * 0.8 + rnorm(n, 0, 0.25)
peou1 <- peou * 1.1 + rnorm(n, 0, 0.25)
peou2 <- peou * 0.9 + rnorm(n, 0, 0.15) 
peou3 <- peou * 0.75 + rnorm(n, 0, 0.20)
pu1 <- pu * 1.0  + rnorm(n, 0, 0.25)
pu2 <- pu * 0.9 + rnorm(n, 0, 0.3)
pu3 <- pu * 1.1 + rnorm(n, 0, 0.2)
my.data <- data.frame(cbind(peou1, peou2, peou3, pu1, pu2, pu3))
write.csv(my.data, '~/Teaching/stats/semtutorial/CD/dataset9.csv', row.names=F)
