bears | R Documentation |
This data set contains data from a subset of the original data set bears
supplied by Gary Alt. These data were collected in the interest of estimating
the weight of a bear based on other measurements of the bear.
bears
A data frame with 24 observations (rows) and 12 variables (columns).
Column name | Data type | Description | Values | |
[,1] | ID | integer | Identification number | (1 - 24) |
[,2] | Weight | integer | The weight of the bear in pounds | (20 - 255) |
[,3] | Length | integer | The length of the bear in inches | (91 - 187) |
[,4] | Age | integer | The bear's age in month | (8 - 177) |
[,5] | Month | integer | The month the measurement was made (4 = April) | (4 - 9) |
[,6] | Head.L | integer | Length of the head in inches | (23 - 43) |
[,7] | Head.W | integer | Width of the head in inches | (11 - 25) |
[,8] | Neck.G | integer | Girth (distance around) the neck in inches | (27 - 80) |
[,9] | Chest.G | integer | Girth (distance around) the chest in inches | (48 - 137) |
[,10] | Sex | factor | The bear's gender: F = female, M = male | (F, M) |
[,11] | Group | integer | 6 different groups | (1 - 6) |
[,12] | Sim | numeric | (1.793 - 5.534) |
The bears
data, supplied by Gary Alt., was referenced in Reader's Digest
(April 1979) and Sports Afield (September 1981).
# Linear model
res <- lm(Weight ~ Length + I(Length^2), data = bears)
# Box plot of weight based on gender
boxplot(Weight ~ Sex, data = bears)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.