Re: [R] Generating multinomial distribution and plotting

2010-09-11 Thread thedreamshaper
Hi, I actually largely solved the problem, i am using this code: var1 <- rnorm(5000,0,5) var2 <- 0.90*var1+0.10*rnorm(5000,0,10) plot(var1,var2) Its somewhat simplistic to say the least but it works more or less, i will definantly look into your suggestion though! Thanks Thor Denmark On Sun

Re: [R] Generating multinomial distribution and plotting

2010-09-11 Thread Peng, C
Oh,You actually want a mixture of two different normal random variables. -- View this message in context: http://r.789695.n4.nabble.com/Generating-multinomial-distribution-and-plotting-tp2535895p2536026.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Generating multinomial distribution and plotting

2010-09-11 Thread Dennis Murphy
Hi: Do you mean multinomial or multivariate normal? If the latter, then in addition to the previous response, there is package mvtnorm and a function mvrnorm() in the MASS package to generate correlated multivariate normal samples. HTH, Dennis On Sat, Sep 11, 2010 at 12:52 PM, thedreamshaper wro

Re: [R] Generating multinomial distribution and plotting

2010-09-11 Thread Peng, C
package: {mnormt} -- View this message in context: http://r.789695.n4.nabble.com/Generating-multinomial-distribution-and-plotting-tp2535895p2535934.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list http

[R] Generating multinomial distribution and plotting

2010-09-11 Thread thedreamshaper
I have had plenty of succes generating one dimensional variables and plotting them, but what do i do for more (specifically 2) dimensional multinomial variables? I figure i have to create a vector consisting of two 1 dim normallly distributed variables, that way i can also control the correlatio