powered by
Covariance matrix is created using for each position cov.matrix[i,j] = rho^|i-j|
gen.synth.xdata(n.obs, n.vars, rho, my.mean = rep(0, n.vars))
number of observations
number of variables
value used to calculate rho^|i-j| . values between 1 and 0
vector of mean variables
a matrix of xdata
# NOT RUN { gen.synth.xdata(100, 8, .75) gen.synth.xdata(1000, 5, .2) cov(gen.synth.xdata(n.obs = 10, n.vars = 10, rho = .2)) # }
Run the code above in your browser using DataLab