get95CIellipse | R Documentation |
This function uses PCA to calculate the standard deviation across the two main axes of the spread of 2D data. Multiplying that length-2 vector by 'pi' and the confidence level gives the surface area of an ellipse that will contain the mean in some percentage of cases. This relies on the data being in the same unit, and makes most sense if it is real data (such as locations in a cartesian coordinate system).
get95CIellipse(df, vars = NULL, conf.level = 0.95)
df |
A data frame, with (at least) 2 variables with the same unit. |
vars |
A list of column to use in the data frame, if 'df' has more than 2 columns. |
conf.level |
The level of confidence to use. Default is 0.95. |
Not yet.
The surface area of an ellipse that contains the mean of the data in 95% of replications of the same experiment.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.