yX.sparrow<-dget("yX.sparrow") ### sample from the multivariate normal distribution rmvnorm<-function(n,mu,Sigma) { p<-length(mu) res<-matrix(0,nrow=n,ncol=p) if( n>0 & p>0 ) { E<-matrix(rnorm(n*p),n,p) res<-t( t(E%*%chol(Sigma)) +c(mu)) } res } ###