Hi, I have generate a variable which I have called X, it has a uniform distribution like this: gen x=runiform(0,2). I want to create another variable, called it Y, that has a fixed correlation with X. For instance 0.5. I have already tried commands such as corr2data but they do not work the way I want to. I will sincerely appreciate a little help with my problem, thank you very much.
Related Posts with How to generate a variable with with fixed correlations to an existing variable which already has a uniform distribution
Plotting output from stpm2.I'm looking to plot differences in survival among patients in different treatment groups. The KM cur…
ginidesc questionsHi all, I am new to this forum and a very new STATA user so any help or suggestions at all is appre…
expand data at the beginning of the panelHi all, I try to create new missing values in a dataset, in order to obtain the same time period fo…
Moran's I and spatial weights matrixHello everybody, I wish to compute the Moran's I statistic and I'm following the code written by Pi…
Statistics tableHi, I have a dataset for 12 countries, and looking to generate a table similar to the attached one. …
Subscribe to:
Post Comments (Atom)
0 Response to How to generate a variable with with fixed correlations to an existing variable which already has a uniform distribution
Post a Comment