rnorm_pre Produces a random normally distributed vector with the specified correlation to an existing vector
rnorm_pre(x, mu = 0, sd = 1, r = 0, empirical = FALSE)
| x | the existing vector |
|---|---|
| mu | desired mean of returned vector |
| sd | desired SD of returned vector |
| r | desired correlation between existing and returned vectors |
| empirical | logical. If true, mu, sd and r specify the empirical not population mean, sd and covariance |
vector
#> [1] 0.2457445