[R] Problems creating a random sample

Adriane Leal loparic at student.fsa.ucl.ac.be
Wed Jan 12 13:05:21 CET 2000


Hi!

I'm supposed to create a random sample bivariate normal variates of size
equal to 250 with  mean vector (-1,1) and cov matrix (1,0.95,0.95,1)

In S language I would write:

> mean<-c(-1,1)
> cov<-c(1,0.95,0.95,1)
> covmat<-matrix(cov,nrow=2,ncol=2)
> mvnorm<-rmvnorm(250,mean,covmat)
... and it should work

I've tried this in R, but it does not recognize "rmvnorm".

(Error: couldn't find function "rmvnorm")

Does anybody knows what function should I use in this case?

My best regards,

Adriane



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list