Learn R Programming

PairedData (version 1.1.1)

Iron: Iron data from Preece (1982, Table 10)

Description

This dataset presents 10 paired data corresponding to percentages of iron found in compounds with the help of two different methods (take a guess: A & B). It is quite intersting to study rounding effect on hypothesis test (have a look at the examples section).

Usage

data(Iron)

Arguments

Format

A dataframe with 10 rows and 3 columns:

[,1] Compound factor
[,2] Method_A numeric percentage of iron
[,3] Method_B numeric percentage of iron

References

Preece, D.A. (1982) t is for trouble (and textbooks): a critique of some examples of the paired-samples t-test. The Statistician, 31 (2), 169-195.

Examples

Run this code
# NOT RUN {
data(Iron)

# Visualizing, very nice correlation
# Is this an agreement problem or a comparison problem?
with(Iron,plot(paired(Method_A,MethodB)))

# Significant... p=0.045
with(Iron,t.test(paired(Method_A,MethodB)))

# Looking at data, rounded at 0.1 so they can be +0.05 or -0.05
show(Iron)

# Thus the differences can be +0.1 or -0.1
# Influence of rounding on the t-statistic
with(Iron,t.test(Method_A-MethodB+0.1))
with(Iron,t.test(Method_A-MethodB-0.1))
# }

Run the code above in your browser using DataLab