eq.tost.CI: Independent samples equivalence test using confidence...

Description Usage Arguments Value Author(s) Examples

View source: R/eq.tost.CI.R

Description

The two one-sided test for independent samples can be expressed using the confidence inclusion principle. If the confidence interval around a mean difference is within the equivalence bounds, then the mean difference is considered to be practically meaningless.

Usage

1
2
3
4
5
6
7
eq.tost.CI(x, y, ei, alpha = 0.05, na.rm = FALSE)

## S3 method for class 'eq.tost.CI'
print(x, ...)

## S3 method for class 'eq.tost.CI'
plot(x, y = NULL, ...)

Arguments

x

object of class eq.tost.CI

y

a NULL object

ei

equivalence interval

alpha

desired alpha level

...

additional arguments

dat

an N x 3 matrix or data.frame containing raw data used to compute the correlation matrix between variables. The input may also be a 1 x 3 vector of correlations (r12, r13, and r23, respectively) and requires a sample size input (N)

n

sample size when dat input is a vector of correlations

x

object of class eq.tost.CI

Value

returns a list containing the p-value, confidence interval, and statistical decision

Author(s)

Rob Cribbie cribbie@yorku.ca and Phil Chalmers rphilip.chalmers@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
#raw data
set.seed(1234)
x <- rnorm(100)
y <- rnorm(100)
dat <- data.frame(dv=c(x,y),  group=c(rep('g1', length(x)), rep('g2', length(y)) ))

# Plot raw data distribution

ggplot(dat,aes(x=dv)) + 
  geom_histogram(data=subset(dat,group == 'g1'),fill = 'red', alpha = 0.2) +
  geom_histogram(data=subset(dat,group == 'g2'),fill = 'blue', alpha = 0.2)
  
# Run test
ei <- 0.50
res <- eq.tost.CI(x,y, ei=ei, alpha=.05)
plot(res)

## End(Not run)

cribbie/equivalencetests documentation built on May 14, 2019, 11:33 a.m.