R: Independent Samples T-Test

ttestIS {jmv} | R Documentation

## Independent Samples T-Test

### Description

Independent Samples T-Test

### Usage

    ttestIS(data, vars, group, students = TRUE, bf = FALSE, bfPrior = 0.707,
      welchs = FALSE, mann = FALSE, hypothesis = "different", norm = FALSE,
      eqv = FALSE, meanDiff = FALSE, effectSize = FALSE, ci = FALSE,
      ciWidth = 95, desc = FALSE, plots = FALSE, miss = "perAnalysis")

### Arguments

`data` | the data as a data frame
`vars` | a vector of strings naming the dependent variables
`group` | a string naming the grouping variable, must have 2 levels
`students` | `TRUE` (default) or `FALSE`, perform Student's t-tests
`bf` | `TRUE` or `FALSE` (default), provide Bayes factors
`bfPrior` | a number between 0.5 and 2 (default 0.707), the prior width to use in calculating Bayes factors
`welchs` | `TRUE` or `FALSE` (default), perform Welch's t-tests
`mann` | `TRUE` or `FALSE` (default), perform Mann-Whitney U tests
`hypothesis` | `'different'` (default), `'oneGreater'` or `'twoGreater'`, the alternative hypothesis; group 1 different to group 2, group 1 greater than group 2, and group 2 greater than group 1 respectively
`norm` | `TRUE` or `FALSE` (default), perform Shapiro-Wilk test of normality
`eqv` | `TRUE` or `FALSE` (default), perform Levene's test for equality of variances
`meanDiff` | `TRUE` or `FALSE` (default), provide means and standard errors
`effectSize` | `TRUE` or `FALSE` (default), provide effect sizes
`ci` | `TRUE` or `FALSE` (default), provide confidence intervals
`ciWidth` | a number between 50 and 99.9 (default: 95), the width of confidence intervals
`desc` | `TRUE` or `FALSE` (default), provide descriptive statistics
`plots` | `TRUE` or `FALSE` (default), provide descriptive plots
`miss` | `'perAnalysis'` or `'listwise'`, how to handle missing values; `'perAnalysis'` excludes missing values for individual dependent variables, `'listwise'` excludes a row from all analyses if one of its entries is missing.

### Value

A results object containing:

`results$ttest` |  |  |  |  | a table containing the t-test results
`results$assum$norm` |  |  |  |  | a table containing the normality tests
`results$assum$eqv` |  |  |  |  | a table containing the equality of variances tests
`results$desc` |  |  |  |  | a table containing the group descriptives
`results$plots` |  |  |  |  | an array of the descriptive plots

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('ToothGrowth')

    ttestIS(data = ToothGrowth, vars = 'len', group = 'supp')

    #
    #  INDEPENDENT SAMPLES T-TEST
    #
    #  Independent Samples T-Test
    #  ----------------------------------------------------
    #                          statistic    df      p
    #  ----------------------------------------------------
    #    len    Student's t         1.92    58.0    0.060
    #  ----------------------------------------------------
    #

[Package jmv version 0.8.6.2 Index]