This function will generate a vector (y) with a known correlation to a given vector (x). The degree of correlation between x and y is determined by the parameter rho (the population correlation). Observed sample correlations between x and y will vary around rho, but this variation will decrease as the size of x increases.

1 | ```
sam.cor(x,rho)
``` |

`x` |
The given vector. |

`rho` |
Population correlation. |

The function prints the sample correlation for the specific set of numbers generated.

`y` |
A vector of numbers correlated with x. |

Paul Bliese paul.bliese@moore.sc.edu

1 2 3 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.