n <- 2500
ease <- rnorm(n, 0, 1)
prof <- rnorm(n, 0, 1)
uslope <- 0.5*ease + prof + rnorm(n, 0, .10)
uintercept <- ease + 0.5* prof + rnorm(n, 0, .10)
use1 <- uintercept + rnorm(n, 0, .10)
use2 <- uintercept + 1*uslope + rnorm(n, 0, .05)
use3 <- uintercept + 2*uslope + rnorm(n, 0, .10)
use4 <- uintercept + 3*uslope + rnorm(n, 0, .05)

use11 <- use1 + rnorm(n, 0, .10)
use12 <- use1 + rnorm(n, 0, .05)
use13 <- use1 + rnorm(n, 0, .15)

use21 <- use2 + rnorm(n, 0, .10)
use22 <- use2 + rnorm(n, 0, .05)
use23 <- use2 + rnorm(n, 0, .15)

use31 <- use3 + rnorm(n, 0, .10)
use32 <- use3 + rnorm(n, 0, .05)
use33 <- use3 + rnorm(n, 0, .15)

use41 <- use4 + rnorm(n, 0, .10)
use42 <- use4 + rnorm(n, 0, .05)
use43 <- use4 + rnorm(n, 0, .15)

data23 <- data.frame(cbind(use11, use12, use13, use21, use22, use23, use31, use32, use33,use41, use42, use43, prof, ease))

names(data23)=c('use11', 'use12', 'use13', 'use21', 'use22', 'use23', 'use31', 'use32', 'use33', 'use41', 'use42', 'use43', 'prof', 'ease')

write.csv(data23, 'dataset23.csv', row.names=F)
