Learn R Programming

datarium (version 0.2.0)

mice2: Mice Weight Data for Paired-Samples Mean Test

Description

contains the weight of 10 mice before and after the treatment.

A paired-samples t-test can be performed to answer to this question.

It is the data set used in the Datanovia tutorial “T-Test in R: One-Sample, Independent (Student & Welch) & Paired” (https://www.datanovia.com/learn/biostatistics/two-groups/t-test-in-r).

Usage

data("mice2")

Arguments

Format

A data frame with 10 rows and 3 columns.

id

mouse identifier (1 to 10).

before

the mouse weight before the treatment.

after

the mouse weight after the treatment.

See Also

mice, the one-sample companion data set. Datanovia tutorial: T-Test in R: One-Sample, Independent (Student & Welch) & Paired.

Examples

Run this code
data(mice2)
head(mice2)

# Paired-samples t-test: did the treatment change the weight?
t.test(mice2$before, mice2$after, paired = TRUE)

Run the code above in your browser using DataLab