Description Usage Arguments Value Note Author(s) References Examples
Function runs some basic multi variable analysis as required for MAT 342 Project 2. Runs a 5 Number Summary, Mean, Inter Quartile Range, Variance, Standard Deviation, then checks for normality by IQR/SD. If there are one to two factors, it runs a t-test and plots it with a histogram and boxplot. If there are more than two factors then it runs a Levene test to check for homoscedasticity (sameness) of variance, if variances are equal across factors, then it runs an ANOVA, where if the means of the factors aren't equal it runs a TukeyHSD table to see which means are different.
1 | SummaryStats(observations, treatments, confidenceInterval)
|
observations |
Your numeric variable, the variable being measured |
treatments |
Your factors, the variables by which you are separating your observations |
confidenceInterval |
Should be self explanatory. If this argument isn't entered it assumes alpha = .05 or a 95% interval |
post.hoc |
Accepts either "Wilcoxon" for pairwise Wilcoxon, or "Dunn" for Dunn's test |
Returns a series of basic statistics about your sample. It runs a t-test or Levene -> ANOVA -> TukeyHSD depending on nlevels of treatment.
5 number summary (with mean) |
Min, Quartiles, Median, Mean, and Max |
Inter Quartile Range |
3rd Quartile - 1st Quartile |
Variance |
|
Standard Deviation |
|
IQR/SD |
Check Normality |
t-test |
If nlevels of treatment == 1 |
Welch test |
If nlevels of treatment == 2 |
Levene test |
If nlevels of treatment > 2 |
oneway test |
If Levene Test returns heteroscedasticity of treatments |
Kruskal-Wallis |
If data is nonparametric, runs a Kruskal-Wallis Test |
Pairwise Wilcox test |
If Kruskal-Wallis returns a significant p value, returns Pairwise Wilcox if post.hoc = NULL or "Wilcoxon" |
Dunn's Test |
If Kruskal-Wallis returns a significant p value, returns Dunn's Test if post.hoc = "Dunn" |
ANOVA test |
If applicable by Levene values |
TukeyHSD |
If applicable by ANOVA values |
I hope you like it
Frederick Kaesmann Jr.
My github -> https://github.com/ftkjr/SummaryPack
1 2 3 | data("CO2")
SummaryStats(CO2$uptake,CO2$Plant)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.