Compute bivariate bagplot, functional bagplot and bivariate HDR boxplot, functional HDR boxplot.
fboxplot(data, plot.type = c("functional", "bivariate"),
type = c("bag", "hdr"), alpha = c(0.05, 0.5), projmethod = c("PCAproj","rapca"),
factor = 1.96, na.rm = TRUE, xlab = data$xname, ylab = data$yname,
shadecols = gray((9:1)/10), pointcol = 1, plotlegend = TRUE,
legendpos = "topright", ncol = 2, ...)
Function produces a graphical plot.
An object of class fds
or fts
.
Version of boxplot. When plot.type="functional"
, a functional plot is provided. When plot.type="bivariate"
, a square bivariate plot is provided.
Type of boxplot. When type = "bag"
, a bagplot is provided. When type = "hdr"
, a HDR boxplot is provided.
Coverage probability for the functional HDR boxplot. \(\alpha\) are the coverage percentages of the outliers and the central region.
When type = "bag"
, the outer region of a bagplot is the convex hull obtained by inflating the inner region by the bagplot factor.
Remove missing values.
A title for the x axis.
A title for the y axis.
Colors for shaded regions.
Color for outliers and mode.
Add a legend to the graph.
Legend position. By default, it is the top right corner.
Number of columns in the legend.
Method used for projection.
Other arguments.
Rob J Hyndman, Han Lin Shang. Please, report bugs and suggestions to hanlin.shang@anu.edu.au
The functional curves are first projected into a finite dimensional subspace via functional principal component decomposition. For simiplicity, we choose the subspace as \(R^2\). Based on Tukey (1974)'s halfspace bagplot and Hyndman (1996)'s HDR boxplot, we order each data point in \(R^2\) by data depth and data density. Outliers are those that have either lowest depth (distance from the centre) or lowest density.
J. W. Tukey (1974) "Mathematics and the picturing of data", Proceedings of the International Congress of Mathematicians, 2, 523-532, Canadian Mathematical Congress, Montreal.
P. Rousseeuw, I. Ruts and J. Tukey (1999) "The bagplot: A bivariate boxplot", The American Statistician, 53(4), 382-387.
R. J. Hyndman (1996) "Computing and graphing highest density regions", The American Statistician, 50(2), 120-126.
R. J. Hyndman and H. L. Shang (2010) "Rainbow plots, bagplots, and boxplots for functional data", Journal of Computational and Graphical Statistics, 19(1), 29-45.
Y. Sun and M. G. Genton (2011) "Functional boxplots", Journal of Computational and Graphical Statistics, 20(2), 316-334.
Y. Sun and M. G. Genton (2012) "Adjusted functional boxplots for spatio-temporal data visualization and outlier detection", Environmetrics, 23, 54-64.
Y. Sun and M. G. Genton (2012) "Functional median polish", Journal of Agricultural, Biological, and Environmental Statistics, 17, 354-376.
SVDplot
fboxplot(data = ElNino_OISST_region_1and2, plot.type = "functional",
type = "bag", projmethod="PCAproj")
fboxplot(data = ElNino_OISST_region_1and2, plot.type = "bivariate",
type = "bag", projmethod="PCAproj")
Run the code above in your browser using DataLab