generating correlated series

Hi Does anyone know of a way to generate series that have a defined correlation, mean and variance? i.e. I want to be able to say "the correlation between the first series and the second is 0.5, between the first and the 3rd is 0.8 etc". Also want to be able to say "mean and variance of the first is 1 and 0.5 respectively etc" for the other series. The last requirement is that none of the values in any of the series can be less than -1. Could anyone help me? I've honestly spent the whole day trying to sort this out!! Thanks!

댓글 수: 4

Oleg Komarov
Oleg Komarov 2011년 6월 27일
Pdf of the series?
Michael
Michael 2011년 6월 27일
sorry, what do you mean?
Oleg Komarov
Oleg Komarov 2011년 6월 27일
probability density functions: uniform, normal,...
Michael
Michael 2011년 6월 27일
oh ya sorry. I want them to be normally distributed. Should make it easier to specify the variance-covariance matrix.

댓글을 달려면 로그인하십시오.

답변 (1개)

Oleg Komarov
Oleg Komarov 2011년 6월 27일

0 개 추천

If you have the stats TB then you just have to use mvnrand, otherwise you can read this reference (pretty straightforward): http://www.columbia.edu/~mh2078/MCS04/MCS_framework_FEegs.pdf chapter 3.

댓글 수: 2

Michael
Michael 2011년 6월 27일
TB? Oh ya thats exactly the document I originally used, but it doesn't prevent the values being less than -1
Oleg Komarov
Oleg Komarov 2011년 6월 28일
TB = Toolbox;
Then you probability want to truncate the gaussian: http://www.mathworks.com/matlabcentral/fileexchange/23832-truncated-gaussian

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Random Number Generation에 대해 자세히 알아보기

질문:

2011년 6월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by