Learn R Programming

rsimsum (version 0.13.0)

tt: Example of a simulation study on the t-test

Description

A dataset from a simulation study with 4 data-generating mechanisms, useful to illustrate custom input of confidence intervals to calculate coverage probability. This simulation study aims to compare the t-test assuming pooled or unpooled variance in violation (or not) of the t-test assumptions: normality of data, and equality (or not) or variance between groups. The true value of the difference between groups is -1.

Usage

tt

Arguments

Format

A data frame with 4,000 rows and 8 variables:

  • diff The difference in mean between groups estimated by the t-test;

  • se Standard error of the estimated difference;

  • conf.low, conf.high Confidence interval for the difference in mean as reported by the t-test;

  • df The number of degrees of freedom assumed by the t-test;

  • repno Identifies each replication, between 1 and 500;

  • dgm Identifies each data-generating mechanism: 1 corresponds to normal data with equal variance between the groups, 2 is normal data with unequal variance, 3 and 4 are skewed data (simulated from a Gamma distribution) with equal and unequal variance between groups, respectively;

  • method Analysis method: 1 represents the t-test with pooled variance, while 2 represents the t-test with unpooled variance.

Examples

Run this code
data("tt", package = "rsimsum")

Run the code above in your browser using DataLab