[R] Problems creating a random sample

About this list Date view Thread view Subject view Author view Other groups

Subject: [R] Problems creating a random sample
From: Adriane Leal (loparic@student.fsa.ucl.ac.be)
Date: Wed 12 Jan 2000 - 22:05:21 EST


Message-ID: <Pine.LNX.3.96.1000112125916.282A-100000@18-76.campusnet.ucl.ac.be>

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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Mon 17 Jul 2000 - 12:33:06 EST