dep.dat <- function (n, r, mu1, mu2, es)
{
# Given the values of n, r, mu1, mu2 and es, this function
# simulates data that can be input to, say granova.ds
mu = c(mu1, mu2)
dif = diff(mu)
spool = dif/es
sigma = matrix(c(1, r, r, 1), ncol = 2)
sigma = (1/sqrt(2)) * spool^2 * sigma
sigma = round(sigma, 2)
xx = mvrnorm(n, mu = c(mu1, mu2), Sigma = sigma)
xx = round(xx[, 2:1], 2)
list(es = es, sigma = sigma, xx = xx)
}
Comments (0)
You don't have permission to comment on this page.