Skip to contents

Provides a statistical significance test of the mean difference.

Usage

# S3 method for data.frame
testMeansDifference(frame, mu=0, ...)

# S3 method for formula
testMeansDifference(formula, mu=0, ...)

# S3 method for wsm
testMeansDifference(moments, corrs, mu=0, ...)

# S3 method for bsm
testMeansDifference(moments, mu=0, ...)

Arguments

frame

a set of (non-empty) numeric vectors of data values

formula

a formula of the form lhs ~ rhs where lhs is a numeric variable giving the data values and rhs a factor giving the corresponding groups

moments

a matrix/frame of descriptive/summary statistics

corrs

a matrix/frame of correlations among the measures

mu

a number indicating the true/hypothesized value of the mean difference

Details

This function compares two groups or variables. As such, the supplied factor or table of summary statistics should contain only two groups or two variables.

Value

The returned frame contains the following components:

Diff

the difference between the two means

SE

the standard error of the difference

df

the degrees of the freedom for the difference

t

the t value for the difference

p

the p value for the difference