Prior to executing the code, install the negligible package using
install.packages(“negligible”)
#access the negligible package
library(negligible)
#load dataset
library(datasets)
data(ToothGrowth)
head(ToothGrowth)
## len supp dose
## 1 4.2 VC 0.5
## 2 11.5 VC 0.5
## 3 7.3 VC 0.5
## 4 5.8 VC 0.5
## 5 6.4 VC 0.5
## 6 10.0 VC 0.5
# Let's compare Guinea pig tooth (odontoblast) length across two groups:
# Group 1) Took Vitamin C via Orange Juice
# Group 2) Took Vitamin C via Ascorbic Acid
# IV = supp (Vitamin C Supplement)
# DV = len (Tooth length)
# Negligible Effect Interval: {-3, 3}
#Simple Set up
#By default uses the Welch on Trimmed Means
neg.twoindmeans(iv=supp,dv=len,
data=ToothGrowth,
eiL=-3,eiU=3)
## ---- Equivalence of Two Independent Groups----
##
## Test Statistic:
## Schuirmann-Yuen Test of the Equivalence of Two Independent Groups
##
## **********************
##
## Levels of the IV: OJ, VC
## Group Means: 20.66333, 16.96333
## Group Trimmed Means: 21.70556, 16.58333
## Group SDs: 6.605561, 8.266029
## Group MADs: 5.48562, 9.26625
##
## **********************
##
## Standardized Mean Difference (SMD): 0.6393216
## 90% CI for SMD: (0.1517905, 1.210112)
##
## **********************
##
## Equivalence Interval: Lower = -3 , Upper = 3
##
## **********************
##
## Mean Difference (MD): 5.122222
## 90% CI for MD: (1.35, 8.807222)
## 95% CI for MD: (0.3390278, 9.355833)
##
## **********************
##
## Proportional Distance (PD): 1.707407
## 95% CI for PD: (0.1130093, 3.118611)
##
## **********************
##
## TOST Test Statistics:
##
## Ho: mu1-mu2>=eiU:
## t = 0.9476839 (df = 33.49113), p = 0.82496
##
## Ho: mu1-mu2<=eiL:
## t = 3.627 (df = 33.49113), p = 0.00047
##
## **********************
##
## NHST Decision:
## The null hypothesis that the difference between the means exceeds the equivalence interval cannot be rejected. A negligible difference in means cannot be concluded. Be sure to interpret the magnitude of the effect size.
##
## **********************
