From: "Tom Lane" <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to generate correlated data based on the given real data
Date: Tue, 31 May 2011 12:58:16 -0400
Organization: The MathWorks, Inc.
Lines: 29
Message-ID: <is36og$3qf$>
References: <is168a$fk1$> <is1adh$p47$> <is28c3$5hc$>
Mime-Version: 1.0
Content-Type: text/plain;
Content-Transfer-Encoding: 7bit
X-Trace: 1306861136 3919 (31 May 2011 16:58:56 GMT)
NNTP-Posting-Date: Tue, 31 May 2011 16:58:56 +0000 (UTC)
In-Reply-To: <is28c3$5hc$>
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
Xref: comp.soft-sys.matlab:729529

> First of all, thank you very much for your help. My problem is that I need 
> to do the load modeling in a power system. In that power system, there are 
> around 40 loads. Furthermore, the loads should be modeled based on a 
> correlation matrix. The correlation matrix is already given due to the 
> standards. However, I have only one single load data which the size is 
> 1*15000. Depending on only that load data and given correlation matrix, I 
> want to generate other load data(s) in the system. I hope this is more 
> clear. Thank you in advance.

You may want to look at the copularnd function. The general idea behind a 
copula is to separate the marginal distribution of each variable from the 
dependence (correlation) structure.

When you generate a matrix U from copularnd, each column is a sample from a 
uniform distribution, but the columns are correlated. Then you can transform 
each column to the distribution that you prefer. (Other posters have given 
ideas about how to do that.)

I assume you want each separate column to have roughly the same distribution 
as your original 15000 values. If that's not the case, I'd need more 
information about how you want to define the column distributions.

This may get you going in the right direction. You should be aware, though, 
that the correlation matrix you provide will not be the same as the 
correlation of U, nor the same as the correlation after transforming each 
column. You'll have to decide if that's a problem for you.

-- Tom