Displaying 5 results from an estimated 5 matches for "pmnorm".
Did you mean:
plnorm
2010 Dec 15
1
pmnorm: probabilites don't sum up to 1
...ate normal distributions
uX = 2
uY = 1
uZ = .5
mu = c(uX, uY, uZ)
LX = matrix(c(1,-1,0,1,0,-1), 2, 3, byrow = TRUE)
LY = matrix(c(-1,1,0,0,1,-1), 2, 3, byrow = TRUE)
LZ = matrix(c(-1,0,1,0,-1,1), 2, 3, byrow = TRUE)
muX = LX %*% mu
muY = LY %*% mu
muZ = LZ %*% mu
Sigma = diag(2)
mean = c(0,0)
pX = pmnorm(muX, mean, Sigma)
pY = pmnorm(muY, mean, Sigma)
pZ = pmnorm(muZ, mean, Sigma)
pX + pY + pZ
I don?t see why the three probabilities don?t sum up to 1?
I know two ?solutions? to this problem so far. However, neither of
them satisfies me:
1. I can set pZ to 1 ? pX ? pY, but doing so, returns a dif...
2011 Mar 04
2
overleap an iteration within a for-loop when error message produced
Dear R-list member,
I'm using the function pmnorm() (-->library(mnormt)) within a for-loop.
Certain parameter values leads to an error message:
"(In sqrt(diag(S)) : NaNs produced, In sqrt(1/diag(V)) : NaNs
produced, In cov2cor(S) : diag(.) had 0 or NA entries; non-finite result
is doubtful)"
obviously because "NaNs" wer...
2013 Mar 05
2
Error message
...ns on fixing this type of error?
Thank you very much in advance.
Hanna
> integrand <- function(x, rho, a, b, z){
+ x1 <- x[1]
+ x2 <- x[2]
+ Sigma <- matrix(c(1, rho, rho, 1), 2,2)
+ mu <- rep(0,2)
+ f <- pmnorm(c((z-a*x1)/b, (z-a*x2)/b), mu,
Sigma)*dmnorm(c(0,0), mu, diag(2))
+ f
+ }
>
> adaptIntegrate(integrand, lower=rep(-Inf, 2), upper=c(2,2),
+ rho=0.1, a=0.6, b=0.3, z=3, maxEval=10000)
Error in if (any(lower > upper)) stop("lower>u...
2009 Mar 25
1
mvtnorm package
Dear all,
I would like to ask information about the package mvtnorm in R.
It is very useful for me the "qmvnorm" comand, but I see that it can
compute only quantile for equicoordinate. Is it possible to have a
curve (or a set of values) if we don't want equicoordinates?
Thank you
Best regards
Antonio.
--
Antonio Lucadamo,
Dipartimento di Scienze Economiche e Metodi Quantitativi
2008 Feb 19
1
recursive function help
I'm trying to implement a recursive function using integrate, and I
suspect I need a Vectorize somewhere,
but I can't suss it out. Any help would be appreciated. I've tried
traceback() and various debugging ideas to no avail (most likely due to
my inexperience with these tools.)
Here's what I have.
Nk <- function(m, C) {
if (length(m) > 1) {
rho <- C[1, -1]