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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1139 views
  • 0 likes
  • 2 in conversation