Learn R Programming

BSDA (version 1.01)

Gpa: High school GPA versus college GPA

Description

Data for Exercise 2.13

Usage

Gpa

Arguments

Format

A data frame with 10 observations on the following 2 variables.

HSGPA

a numeric vector

CollGPA

a numeric vector

Examples

Run this code
# NOT RUN {
str(Gpa)
attach(Gpa)
plot(HSGPA,CollGPA)
model <- lm(CollGPA~HSGPA)
abline(model)
model
r <- resid(model)
yhat <- fitted(model)
Table2.1 <- cbind(HSGPA,CollGPA,yhat,r)
Table2.1
remove(r,yhat,model,Table2.1)
detach(Gpa)
# }

Run the code above in your browser using DataLab