[R] qmvnorm function
rui1174 at sapo.pt
Wed Mar 14 23:37:30 CET 2012
li li-13 wrote
> Dear all,
> I need to use the "qmvnorm" function in mtvnorm package.
> Here is the error message I got
>> qmvnorm(0.05, tail="upper", sigma=var)$quantile
> Error in uniroot(pfct, interval = interval) :
> f() values at end points not of opposite sign
> There is no problem for 50th quantile.
>> qmvnorm(0.5, tail="upper", sigma=var)$quantile
>  -0.5325527
> Can anyone give some hint regarding this?
> [[alternative HTML version deleted]]
> R-help@ mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
The problem seems to be in the value of 'var'.
> qmvnorm(0.05, tail="upper", sigma=diag(2))$quantile
> qmvnorm(0.05, tail="upper", sigma=diag(5))$quantile
>From these results, there is nothing intrisically wrong with the quantile
In the error message, 'uniroot' is not in an interval with a guaranteed
the parameter 'interval' of 'qmvnorm' will put it in the right track.
Hope this helps,
View this message in context: http://r.789695.n4.nabble.com/qmvnorm-function-tp4473262p4473364.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help