Learn R Programming

GLMsData (version 1.4)

triangle: Artificial data from triangles

Description

The data are the lengths of three sides of (hypothetical) right-angled triangles

Usage

data(triangle)

Arguments

Format

A data frame with 20 observations on the following 3 variables.

y

the length of the hypotenuse; a numeric vector

x1

the length of one side of the triangle; a numeric vector

x2

the length of the third side of the triangle; a numeric vector

Details

The data give the three sides of hypothetical right-angled triangles. The data are randomly generated so that \(y\) is the square root of \(x_1^2 + x_2^2\), plus a small amount of error. The idea is from Gelman and Nolan (2002).

References

The idea is from Andrew Gelman and Deborah Nolan (2002) Teaching Statistics: A bag of tricks. Oxford University Press.

Examples

Run this code
data(triangle)
plot(triangle)

Run the code above in your browser using DataLab