Learn R Programming

AER (version 1.2-13)

USCrudes: US Crudes Data

Description

Cross-section data originating from 99 US oil field postings.

Usage

data("USCrudes")

Arguments

Format

A data frame containing 99 observations on 3 variables.

price

Crude prices (USD/barrel).

gravity

Gravity (degree API).

sulphur

Sulphur (in %).

References

Baltagi, B.H. (2002). Econometrics, 3rd ed. Berlin, Springer.

See Also

Baltagi2002

Examples

Run this code
 if(!requireNamespace("scatterplot3d")) {
  if(interactive() || is.na(Sys.getenv("_R_CHECK_PACKAGE_NAME_", NA))) {
    stop("not all packages required for the example are installed")
  } else q() }
data("USCrudes")
plot(price ~ gravity, data = USCrudes)
plot(price ~ sulphur, data = USCrudes)
fm <- lm(price ~ sulphur + gravity, data = USCrudes)

## 3D Visualization
library("scatterplot3d")
s3d <- scatterplot3d(USCrudes[, 3:1], pch = 16)
s3d$plane3d(fm, lty.box = "solid", col = 4)

Run the code above in your browser using DataLab