0

I tried to simulate 200 random normal numbers for a given normal distribution:

Given distribution

How can i create 200 numbers for x1? I tried

covMat=matrix(c(1,0,0,0,0,1,rho.xz,rho.xeps,0,rho.xz, 1, rho.zeps,0, rho.xeps, rho.zeps, 1), nrow=4, ncol=4)

rmvnorm(200,sigma=covMat,mean=c(0,0,0,0))

but that doesn't really work for me.

Any ideas?

Paolo
  • 3,825
  • 4
  • 25
  • 41
  • 3
    What does "doesnt really work for me" mean exactly? Do you get an error? Are you "testing" these values somehow? When asking for help, you should include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Be sure to define all the variables you use. – MrFlick May 24 '18 at 14:33
  • I tried rand[,1] now, i guess this should do for now – Regressor2000 May 24 '18 at 14:34

0 Answers0