How to show 95% quanile in a Boxplot ?
Show older comments
Hi,
I want to compare the forecast performance of Value at Risk (VaR) from two different models by using a boxplot. Put differently the two models estimate the 95% quantile of the Loss distribution. When I try:
q = quantile(Loss,0.95)
boxplot(Data,'labels',{'VaR GARCH','VaR GJR','Loss'})
line([0 7],[q q])
I get:

Where the solid blue line represents the 95% quantile of the Loss distribution. Unfortunately the whiskers do not represent the 5% and 95% quantiles. The whiskers extend to the most extreme data points not considered outliers, and outliers are plotted individually.
How can I force the whiskers to represent the 5% and 95% quantile?
When I try:
q = quantile(Loss,0.95)
boxplot(Data,'whisker',q,'labels',{'VaR GARCH','VaR GJR','Loss'})
line([0 4],[q q])
I get:

Now the whiskers are too far apart from the solid blue line...
Using MATLAB R2014a, Statistics Toolbox 9.0
Thanks in Advance!
Accepted Answer
More Answers (0)
Categories
Find more on Exploration and Visualization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!