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, Sep 12, 2010 at 12:23 AM, Dennis Murphy [via R] <
ml-node+2535974-1500011135-160...@n4.nabble.com<ml-node%2b2535974-1500011135-160...@n4.nabble.com>
> wrote:

> 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
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=2535974&i=0>>wrote:
>
>
> >
> > 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 correlation.
> >
> > But how do i do this :) ?
> >
> > Many thanks
> > --
> > View this message in context:
> >
> http://r.789695.n4.nabble.com/Generating-multinomial-distribution-and-plotting-tp2535895p2535895.html<http://r.789695.n4.nabble.com/Generating-multinomial-distribution-and-plotting-tp2535895p2535895.html?by-user=t>
> > Sent from the R help mailing list archive at Nabble.com.
> >
> > ______________________________________________
> > [hidden email] 
> > <http://user/SendEmail.jtp?type=node&node=2535974&i=1>mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] <http://user/SendEmail.jtp?type=node&node=2535974&i=2>mailing 
> list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
> ------------------------------
>  View message @
> http://r.789695.n4.nabble.com/Generating-multinomial-distribution-and-plotting-tp2535895p2535974.html
> To unsubscribe from Generating multinomial distribution and plotting, click
> here<http://r.789695.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=2535895&code=dGhlZHJlYW1zaGFwZXJAZ21haWwuY29tfDI1MzU4OTV8LTEzOTQ5MDU4NA==>.
>
>
>


-- 
-------------------------------------
Please note that this message may contain confidential information. If you
are not the intended recipient you are hereby notified that any
dissemination, copying, or distribution of this message or files associated
with this message is strictly prohibited. If you have recieved this message
in error, please notify me immediately.

-- 
View this message in context: 
http://r.789695.n4.nabble.com/Generating-multinomial-distribution-and-plotting-tp2535895p2536011.html
Sent from the R help mailing list archive at Nabble.com.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to