BookmarkSubscribeRSS Feed
tammy
Calcite | Level 5
how do i create a simulation with n observations where the variables such as income, age, gender, etc have a specific r or correlation such as .5?
1 REPLY 1
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12
I think the title of your request is misleading since you don't seem to want independent variables generated. It is easy to use PROC IML to generate correlated normal variables. Google searches will show lots of examples. There is a whole chapter in the IML documentation on simulating values of different distributions. If you want to avoid IML, the new procedure SIMNORMAL should work fine. You can either input a covariance matrix directly, or take one from a PROC CORR run, and then generate as many values as you want. I have not used SIMNORMAL yet.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1224 views
  • 0 likes
  • 2 in conversation