BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ZMX
Fluorite | Level 6 ZMX
Fluorite | Level 6

Hi everyone,

 

I would like to know if there is a way to generate multiple variables where each has a certain distributional form given a covariance matrix. Specifically, I'm looking to generate three variables (X1, X2, X3) with X1~lognormal, X2~multimodal and a X3~normal distribution, and also allow for correlation among all three (given a covariance matrix). 

 

I read about generating univariate data from each type of distribution independently and also ways to generate MVN or more complex distributions given a covariance matrix, but I can't seem to find a way to allow for different distributional forms given a covariance matrix.

 

highly appreciate any help.

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

The technique you are looking for is called a "copula." It is a multivariate distribution with a given correlation structure with specified marginal distributions for each variable.  You can use PROC COPULA in SAS if you have a SAS/ETS license. Chapter 9 of Simulating Data with SAS (Wicklin, 2013) includes SAS/IML programs that generate correlated variables for discrete variables (binary and ordinal) as well as the copula approach for continuous variables (pp. 164-170). I also describe a powerful technique called the Iman-Conover method (pp. 161-164).

 

You can download the programs from the book's web site. 

 

 

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

The technique you are looking for is called a "copula." It is a multivariate distribution with a given correlation structure with specified marginal distributions for each variable.  You can use PROC COPULA in SAS if you have a SAS/ETS license. Chapter 9 of Simulating Data with SAS (Wicklin, 2013) includes SAS/IML programs that generate correlated variables for discrete variables (binary and ordinal) as well as the copula approach for continuous variables (pp. 164-170). I also describe a powerful technique called the Iman-Conover method (pp. 161-164).

 

You can download the programs from the book's web site. 

 

 

ZMX
Fluorite | Level 6 ZMX
Fluorite | Level 6
Many thanks for your help. Got the book and the programs and everything works well.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 2 replies
  • 968 views
  • 3 likes
  • 2 in conversation