| 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:
-
meanxSample mean of the first population/group. -
meanySample mean of the second population/group. -
trmeanxSample trimmed mean of the first population/group. -
trmeanySample trimmed mean of the second population/group. -
sdxSample standard deviation of the first population/group. -
sdySample standard deviation of the second population/group. -
madxSample median absolute deviation of the first population/group. -
madySample median absolute deviation of the second population/group. -
eiLLower bound of the negligible effect (equivalence) interval. -
eiUUpper bound of the negligible effect (equivalence) interval. -
effsizerawSimple difference in the means (or trimmed means if normality = FALSE) -
cilraw2Lower bound of the 1-alpha CI for the raw mean difference. -
ciuraw2Upper bound of the 1-alpha CI for the raw mean difference. -
cilrawLower bound of the 1-2*alpha CI for the raw mean difference. -
ciurawUpper bound of the 1-2*alpha CI for the raw mean difference. -
effsizedStandardized mean (or trimmed mean if normality = FALSE) difference. -
cildLower bound of the 1-alpha CI for the standardized mean (or trimmed mean if normality = FALSE) difference. -
ciudUpper bound of the 1-alpha CI for the standardized mean (or trimmed mean if normality = FALSE) difference. -
effsizepdProportional distance statistic. -
cilpdLower bound of the 1-alpha CI for the proportional distance statistic. -
ciupdUpper bound of the 1-alpha CI for the proportional distance statistic. -
t1First t-statistic from the TOST procedure. -
t1Second t-statistic from the TOST procedure. -
df1Degrees of freedom for the first t-statistic from the TOST procedure. -
df2Degrees of freedom for the second t-statistic from the TOST procedure. -
p1p value associated with the first t-statistic from the TOST procedure. -
p2p value associated with the second t-statistic from the TOST procedure. -
alphaNominal 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