Learn R Programming

MPV (version 1.64)

p2.12: Data Set for Problem 2-12

Description

The p2.12 data frame has 12 observations on the number of pounds of steam used per month at a plant and the average monthly ambient temperature.

Usage

data(p2.12)

Arguments

Format

This data frame contains the following columns:

temp

ambient temperature (in degrees F)

usage

usage (in thousands of pounds)

Examples

Run this code
data(p2.12)
attach(p2.12)
usage.lm <- lm(usage ~ temp)
summary(usage.lm)
predict(usage.lm, newdata=data.frame(temp=58), interval="prediction")
detach(p2.12)

Run the code above in your browser using DataLab