Dear all,

I would like to simulate some data: a bivariate random vector (v,u) which is bivariate normal, but with a correlation which depends on a third variable x.

Suppose I have 10 x 1 vector of xis. I can define the correlation as

p(xi)=[exp(xi)-1]/[exp(xi)+1]

such that it each p(xi) with the interval [-1,1].

Then I would like to draw a bivariate random vector of size 10 (v,u) with correlation matrix (1 , p(xi) \ p(xi) , 1). Essentially I would like to have a distinct Corr(vi,ui)=p(xi).

Anyone has any ideas?

Thank you!

Riju