my.sem <- sem(my.model, cov(my.data), nrow(my.data), par.size="startvalues")
peou = rnorm(100)
method = rnorm(100, 1, 0.5)
peou1 <- peou * 1.1 + rnorm(100, 0, 0.25) + method
peou2 <- peou * 0.9 + rnorm(100, 0, 0.15) + method
peou3 <- peou * 0.75 + rnorm(100, 0, 0.20) + method
data <- data.frame(cbind(peou1, peou2, peou3))
pu <- peou * 0.2 + rnorm(100)
pu1 <- pu * 1.0  + rnorm(100, 0, 0.25) + method
pu2 <- pu * 0.9 + rnorm(100, 0, 0.3) + method
pu3 <- pu * 1.1 + rnorm(100, 0, 0.2) + method
data <- data.frame(cbind(peou1, peou2, peou3, pu1, pu2, pu3))
write.csv(data, '~/Teaching/stats/semtutorial/CD/dataset8.csv', row.names=F)
