Learn R Programming

datana (version 1.1.2)

education: Stock and Watson CPS Education Earnings

Description

Stock and Watson (2007) provide several subsets created from March Current Population Surveys (CPS) with data on the relationship of earnings and education over several years. This data corresponds to the CPSSWEducation dataset.

Usage

data(education)

Arguments

Format

A data frame containing 2,950 observations on 4 variables.

age

Age in years.

gender

Factor indicating gender.

earnings

Average hourly earnings (sum of annual pretax wages, salaries, tips, and bonuses, divided by the number of hours worked annually).

education

Number of years of education.

References

  • Stock, J.H. and Watson, M.W. (2007). Introduction to Econometrics, 2nd ed. Boston: Addison Wesley.

Examples

Run this code
data(education)

## Stock and Watson, p. 165
plot(earnings ~ education, data = education)
fm <- lm(earnings ~ education, data = education)
abline(fm)

Run the code above in your browser using DataLab