BookmarkSubscribeRSS Feed

Simulate Correlated Multivariate Binary Variables

Started ‎06-05-2014 by
Modified ‎04-25-2022 by
Views 3,009

This program enables you to simulate correlated multivariate binary data according to the algorithm of Emrich and Piedmonte (1991). The program is from Wicklin (2013). The attached file is RandMVBinary.zip, which contains two files:

  1. RandMVBinary.sas defines the RANDMVBINARY function, along with some helper functions. Save this file so that it can included into a SAS session. For example, save it to C:\Users\<userid>\Documents\My SAS Files\RandMVBinary.sas
  2. SimMVBinary.sas is a "driver" program that contains three examples of generating binary data. It shows how to load and call the RANDMVBINARY function.

 

Note that you should %INCLUDE the RandMVBinary.sas file before calling the IML procedure.  Within the procedure, use the LOAD statement to load the RANDMVBINARY function before you call it.

 

The RANDMVBINARY function uses features of SAS/IML 12.1, which was released as part of SAS 9.3m2.  If you are running an earlier version of SAS, call the function RANDMVBINARY93, which has the same syntax but is slightly less efficient.

 

References:

Emrich, L.J. and Piedmonte, M. R., 1991, "A Method for Generating High-Dimensional Multivariate Binary Variables," The American Statistician, 45, p. 302--304

Wicklin, R., 2013, Simulating Data with SAS, SAS Institute Inc., Cary NC, pp. 154--157.

Version history
Last update:
‎04-25-2022 11:00 AM
Updated by:

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Labels
Article Tags