Learn R Programming

walrus (version 1.0.5)

rttestPS: Robust Paired Samples T-Test

Description

Robust Paired Samples T-Test

Usage

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

Value

A results object containing:

results$ttestthe 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)

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

Examples

Run this code
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
#  ---------------------------------------------
#

Run the code above in your browser using DataLab