Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #make a multivariate vector with known correlation
- sigma_mat <- matrix(c(1,.3, 0.2,
- 0.3, 1, 0.4,
- 0.2, 0.4, 1), nrow=3)
- z <- rmvnorm(1, c(0,0, 0), sigma_mat)
- z_2 <- z[2]
- z[2] <- NA
- #model
- mod <- alist(
- z <- dmvnorm(0, sigma)
- )
- #fit - doesn't work...
- fit <- map2stan(mod,
- data=list(z=z, sigma=sigma),
- start=list(z=c(z[1], 0, z[2])))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement