Hello,
I try to create a persp-plot for the bivariate normal distribution.
There are a few solutions online ([1],[2]), but I did not want to
hard-code the formula like [2] did or use a kernel density estimate like
[1].
My plan was to use dmvnorm, and use outer to calculate the z-dimension
Hello David and Dennis,
thank you two for your replies. You not only helped me solve my problem,
but also helper me to understand my problem better.
Here is my -now working- code:
x-y-seq(-4,4,len=40)
g-function(a,b) {
dmvnorm(x=cbind(a,b),sigma=matrix(c(4,2,2,3), ncol = 2))
}
2 matches
Mail list logo