peou = rnorm(100)
peou1 <- peou * 1.1 + rnorm(100, 0, 0.25)
peou2 <- peou * 0.9 + rnorm(100, 0, 0.15)
peou3 <- peou * 0.75 + rnorm(100, 0, 0.20)
pu <- peou * 0.2 + rnorm(100)
pu1 <- pu * 1.0 + peou * 1.0 + rnorm(100, 0, 0.25)
pu2 <- pu * 0.9 + rnorm(100, 0, 0.3)
pu3 <- pu * 1.1 + rnorm(100, 0, 0.2)
data <- data.frame(cbind(peou1, peou2, peou3, pu1, pu2, pu3))
write.csv(data, '~/Teaching/stats/semtutorial/CD/dataset5.csv', col.names=T, row.names=F)
