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
Collapsing data by both weighted and unweighted meansI have a dataset of ~100K, and I'd like to collapse the data for variable Alpha into its mean, and v…
Measurement invariance MGCFA: correct approach and issue with identification of configural modelDear Statalist members, I have a question about measurement invariance testing for multigroup confi…
Simple Binary Outcome QuestionHello, I am having a problem understanding a simple statement that I need to code in Stata. Define…
Need help with creating first difference operator for regression - econometricsHi There Everyone. I hope you're all well. I had a question, I'm really lost - i need to create a f…
Need Help Appending a Column Using AsdocDear all, I am using Stata 16, on mac and have provided a sample of my dataset using dataex at the …
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