You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
The ConfidenceEllipse package provides functions for computing the coordinate points of confidence ellipses and ellipsoids for a given bivariate and trivariate dataset, at user-defined confidence level.
TheConfidenceEllipse package computes the coordinate points ofconfidence region for a given bivariate and trivariate dataset. The sizeof the elliptical region is determined by the confidence level, and theshape is determined by the covariance matrix. The confidence level,typically 95% or 99%, indicates the probability that the ellipsecontains the true mean vector, assuming a distribution.
Installation
You can installConfidenceEllipse from CRAN using:
install.packages("ConfidenceEllipse")
Alternatively you can grab the development version from github usingdevtools:
The dataset is comprised of 13 different measurements for 180archaeological glass vessels from different groups (Janssen, K.H.A., DeRaedt, I., Schalm, O., Veeckman, J.: Microchim. Acta 15 (suppl.) (1998)253-267. Compositions of 15th - 17th century archaeological glassvessels excavated in Antwerp.)
First, theconfidence_ellipse function is used to compute coordinatepoints of the confidence ellipse and then the ellipse is plotted on atwo-dimensional plotx-y of the data. It shows a region that, with aspecified confidence levelconf_level, is expected to contain thepopulation mean vector of a bivariate distribution.
For grouping bivariate data, the.group_by argument can be used if thedata contains an unique grouping variable (.group_by = NULL bydefault). When a grouping variable is provided, the function willcompute the ellipses separately for each level of the factor, allowingyou to explore potential differences or patterns within subgroups of thedata.
It’s important to note that the grouping variable should beappropriately coded as a factor before passing it to the.group_byargument. If the variable is currently stored as a character or numerictype, you may need to convert it to a factor using functions likeas.factor() orforcats::as_factor().
The ConfidenceEllipse package provides functions for computing the coordinate points of confidence ellipses and ellipsoids for a given bivariate and trivariate dataset, at user-defined confidence level.