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
Related Posts with How to draw bivariate random vector (v,u) which is bivariate normal, but with a correlation which depends on a third variable x?
Can i pick the Model with lower AIC but higher BIC?Good day Everyone, I was comparing two models Model2 has a lower AIC but a higher BIC. can i pick m…
MATCHIT- Stata for data consolidation and cleaning using fuzzy string comparisonsHello, I came across your matchit command in Stata for data consolidation and cleaning using fuzzy …
need help: panel data analysisHello, I have a panel data sample consisting of obervations of several years. For each year I have …
probleme to perform ado functionDears, i am a new one on this forum and on stata, thank you for your help my question is : I want t…
probleme to perform ado functionDears, i am a new one on this forum and on stata, thank you for your help my question is : I want t…
Subscribe to:
Post Comments (Atom)
0 Response to How to draw bivariate random vector (v,u) which is bivariate normal, but with a correlation which depends on a third variable x?
Post a Comment