Hello, 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 > [1] -0.5325527 > > Can anyone give some hint regarding this? > > Thanks. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@ mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > 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 [1] 0.7600695 > qmvnorm(0.05, tail="upper", sigma=diag(5))$quantile [1] -0.123829 >From these results, there is nothing intrisically wrong with the quantile 0.05. In the error message, 'uniroot' is not in an interval with a guaranteed solution, maybe the parameter 'interval' of 'qmvnorm' will put it in the right track. Hope this helps, Rui Barradas -- 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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.