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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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