Greetings,
My colleagues and I are trying to solve a simulation problem in which we are trying generate a new variable with a known correlation to given variables.
Imagine we have two variables, x1 and x2, which have a given correlation. I want to generate a normally distributed variable y which will have a specified correlation with each of x1 and x2. For example, let’s say that x1 and x2 are correlated .25 and I want y to be correlated with x1 at .2 and x2 at .5. x1 and x2 could have a number of different distributions in different scenarios.
Our simulation requires that we keep x1 and x2 and generate a new variable y. Note that corr2data, as I understand it, can only generate new variables which follow a normal distribution. That is, corr2data cannot take an existing variable and generate new variables correlated with that variable.
We can generate a y with a chosen correlation with either x1 or x2. But we haven’t figured out how to generate a y that has specified correlations with both x1 and x2.
Any help or guidance is much appreciated.
My colleagues and I are trying to solve a simulation problem in which we are trying generate a new variable with a known correlation to given variables.
Imagine we have two variables, x1 and x2, which have a given correlation. I want to generate a normally distributed variable y which will have a specified correlation with each of x1 and x2. For example, let’s say that x1 and x2 are correlated .25 and I want y to be correlated with x1 at .2 and x2 at .5. x1 and x2 could have a number of different distributions in different scenarios.
Our simulation requires that we keep x1 and x2 and generate a new variable y. Note that corr2data, as I understand it, can only generate new variables which follow a normal distribution. That is, corr2data cannot take an existing variable and generate new variables correlated with that variable.
We can generate a y with a chosen correlation with either x1 or x2. But we haven’t figured out how to generate a y that has specified correlations with both x1 and x2.
Any help or guidance is much appreciated.
Comment