r - Cycle for and mvtnorm? -


i need combine cycle function mvtnorm. pmvnorm can done:for example here create vector different value of cumulative probability according different value of mean:

a <- c(0, 0, 0) y <- c(0, 0, 0) for(i in 1:3) a[i] <- i*0.5 for(i in 1:3) y[i] <- pnorm(2, a[i], 1) y # [1] 0.9331928 0.8413447 0.6914625 

but if use mvtnorm? have vector of probabilities of bivariate mean of 1 of 2 distribution takes different value. how write command mu? example

library(mvtnorm) <- c(0, 0, 0) for(i in 1:3) a[i] <- i*0.5 mu <- c(0, 0) for(i in 1:2) mu[i] <- (1, a) 

...and on. i'm blocked command mu. can me? thank you


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -