rttestPS: Robust Paired Samples T-Test

View source: R/rttestps.h.R

rttestPSR Documentation

Robust Paired Samples T-Test

Description

Robust Paired Samples T-Test

Usage

rttestPS(data, pairs, tr = 0.2, md = FALSE, es = FALSE, ci = FALSE)

Arguments

data

the data as a data frame

pairs

a list of lists specifying the pairs of measurement in data

tr

a number between 0 and 0.5, (default: 0.2), the proportion of measurements to trim from each end, when using the trim and bootstrap methods

md

TRUE or FALSE (default), provide means and standard errors

es

TRUE or FALSE (default), provide effect sizes

ci

TRUE or FALSE (default), provide confidence intervals

Value

A results object containing:

results$ttest the table of t-test results

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$ttest$asDF

as.data.frame(results$ttest)

Examples

data(anorexia, package='MASS')
anorexiaFT <- subset(anorexia, subset = Treat == "FT")

rttestPS(anorexiaFT,
         pairs = list(
             list(i1 = 'Prewt', i2 = 'Postwt')))

#
#  ROBUST PAIRED SAMPLES T-TEST
#
#  Robust Paired Samples T-Test
#  ---------------------------------------------
#                       t        df      p
#  ---------------------------------------------
#    Prewt    Postwt    -3.83    10.0    0.003
#  ---------------------------------------------
#


walrus documentation built on Sept. 8, 2022, 9:07 a.m.