neg.twoindmeans {negligible} | R Documentation |
Negligible Effect Test on the Difference between the Means of Independent Populations
Description
This function allows researchers to test whether the difference between the means of two independent populations is negligible, where negligible represents the smallest meaningful effect size (MMES, which in this case the effect is the mean difference)
Usage
neg.twoindmeans(
v1 = NULL,
v2 = NULL,
dv = NULL,
iv = NULL,
eiL,
eiU,
varequiv = FALSE,
normality = FALSE,
tr = 0.2,
nboot = 500,
alpha = 0.05,
plot = TRUE,
saveplot = FALSE,
data = NULL
)
## S3 method for class 'neg.twoindmeans'
print(x, ...)
Arguments
v1 |
Data for Group 1 (if dv and iv are omitted) |
v2 |
Data for Group 2 (if dv and iv are omitted) |
dv |
Dependent Variable (if v1 and v2 are omitted) |
iv |
Dichotomous Predictor/Independent Variable (if v1 and v2 are omitted) |
eiL |
Lower Bound of the Equivalence Interval |
eiU |
Upper Bound of the Equivalence Interval |
varequiv |
Are the population variances assumed to be equal? Population variances are assumed to be unequal if normality=FALSE. |
normality |
Are the population variances (and hence the residuals) assumed to be normally distributed? |
tr |
Proportion of trimming from each tail (relevant if normality = FALSE) |
nboot |
Number of bootstrap samples for calculating CIs |
alpha |
Nominal Type I Error rate |
plot |
Should a plot of the results be produced? |
saveplot |
Should the plot be saved? |
data |
Dataset containing v1/v2 or iv/dv |
x |
object of class |
... |
extra arguments |
Details
This function evaluates whether the difference in the means of 2 independent populations can be considered negligible (i.e., the population means can be considered equivalent).
The user specifies either the data associated with the first and second groups/populations (iv1, iv2, both should be continuous) or specifies the Indepedent Variable/Predictor (iv, should be a factor) and the Dependent Variable (outcome, should be continuous). A 'data' statement can be used if the variables are stored in an R dataset.
The user must also specify the lower and upper bounds of the negligible effect (equivalence) interval. These are specified in the original units of the outcome variable.
The arguments 'varequiv' and 'normality' control what test statistic is adopted. If varequiv = TRUE and normality = TRUE the ordinary Student t statistic is adopted. If varequiv = FALSE and normality = TRUE the Welch t statistic is adopted. If normality = FALSE the ordinary Student t statistic is adopted. d
Value
A list
including the following:
-
meanx
Sample mean of the first population/group. -
meany
Sample mean of the second population/group. -
trmeanx
Sample trimmed mean of the first population/group. -
trmeany
Sample trimmed mean of the second population/group. -
sdx
Sample standard deviation of the first population/group. -
sdy
Sample standard deviation of the second population/group. -
madx
Sample median absolute deviation of the first population/group. -
mady
Sample median absolute deviation of the second population/group. -
eiL
Lower bound of the negligible effect (equivalence) interval. -
eiU
Upper bound of the negligible effect (equivalence) interval. -
effsizeraw
Simple difference in the means (or trimmed means if normality = FALSE) -
cilraw2
Lower bound of the 1-alpha CI for the raw mean difference. -
ciuraw2
Upper bound of the 1-alpha CI for the raw mean difference. -
cilraw
Lower bound of the 1-2*alpha CI for the raw mean difference. -
ciuraw
Upper bound of the 1-2*alpha CI for the raw mean difference. -
effsized
Standardized mean (or trimmed mean if normality = FALSE) difference. -
cild
Lower bound of the 1-alpha CI for the standardized mean (or trimmed mean if normality = FALSE) difference. -
ciud
Upper bound of the 1-alpha CI for the standardized mean (or trimmed mean if normality = FALSE) difference. -
effsizepd
Proportional distance statistic. -
cilpd
Lower bound of the 1-alpha CI for the proportional distance statistic. -
ciupd
Upper bound of the 1-alpha CI for the proportional distance statistic. -
t1
First t-statistic from the TOST procedure. -
t1
Second t-statistic from the TOST procedure. -
df1
Degrees of freedom for the first t-statistic from the TOST procedure. -
df2
Degrees of freedom for the second t-statistic from the TOST procedure. -
p1
p value associated with the first t-statistic from the TOST procedure. -
p2
p value associated with the second t-statistic from the TOST procedure. -
alpha
Nominal Type I error rate
Author(s)
Rob Cribbie cribbie@yorku.ca R. Philip Chalmers chalmrp@yorku.ca Naomi Martinez Gutierrez naomimg@yorku.ca
Examples
indvar<-rep(c("a","b"),c(10,12))
depvar<-rnorm(22)
d<-data.frame(indvar,depvar)
neg.twoindmeans(dv=depvar,iv=indvar,eiL=-1,eiU=1,plot=TRUE,data=d)
neg.twoindmeans(dv=depvar,iv=indvar,eiL=-1,eiU=1)
neg.twoindmeans(v1=depvar[indvar=="a"],v2=depvar[indvar=="b"],eiL=-1,eiU=1)
xx<-neg.twoindmeans(dv=depvar,iv=indvar,eiL=-1,eiU=1)
xx$decis