Displaying 1 result from an estimated 1 matches for "ndistr".
Did you mean:
distr
2007 Apr 05
1
Generate a serie of new vars that correlate with existingvar
...quot; and "newc" lines to allow for more
distributions to be generated ?
Or do I miss an already existing function to do that ?
Regards. Olivier
# slight modification of the original code by Greg Snow
[mailto:Greg.Snow at intermountainmail.org]
# on April 04, 2007 1:46 AM
# generates ndistr vectors of same mean and sd, with various cor.coeffs
# input :
# x1 : a vector
# ndistr : number of distributions
# coefs : vector o ndistr correl. coeffs
CorelSets<-function(x1= rnorm(100, 15, 5),ndistr=3, coefs=c(0.4,0.5,0.6)){
# x2, x3, and x4 in a matrix, these will...