Last data update: 2014.03.03

R: Refinery yield of gasoline
GasolineR Documentation

Refinery yield of gasoline

Description

The Gasoline data frame has 32 rows and 6 columns.

Format

This data frame contains the following columns:

yield

a numeric vector giving the percentage of crude oil converted to gasoline after distillation and fractionation

endpoint

a numeric vector giving the temperature (degrees F) at which all the gasoline is vaporized

Sample

the inferred crude oil sample number - a factor with levels A to J

API

a numeric vector giving the crude oil gravity (degrees API)

vapor

a numeric vector giving the vapor pressure of the crude oil (lbf/in^2)

ASTM

a numeric vector giving the crude oil 10% point ASTM—the temperature at which 10% of the crude oil has become vapor.

Details

Prater (1955) provides data on crude oil properties and gasoline yields. Atkinson (1985) uses these data to illustrate the use of diagnostics in multiple regression analysis. Three of the covariates—API, vapor, and ASTM—measure characteristics of the crude oil used to produce the gasoline. The other covariate — endpoint—is a characteristic of the refining process. Daniel and Wood (1980) notice that the covariates characterizing the crude oil occur in only ten distinct groups and conclude that the data represent responses measured on ten different crude oil samples.

Source

Prater, N. H. (1955), Estimate gasoline yields from crudes, Petroleum Refiner, 35 (5).

Atkinson, A. C. (1985), Plots, Transformations, and Regression, Oxford Press, New York.

Daniel, C. and Wood, F. S. (1980), Fitting Equations to Data, Wiley, New York

Venables, W. N. and Ripley, B. D. (1999) Modern Applied Statistics with S-PLUS (3rd ed), Springer, New York.

Examples

require(lattice)
str(Gasoline)
xyplot(yield ~ endpoint | Sample, Gasoline, aspect = 'xy',
       main = "Gasoline data", xlab = "Endpoint (degrees F)",
       ylab = "Percentage yield",
       type = c("g", "p", "r"),
       index.cond = function(x,y) coef(lm(y~x))[2],
       layout = c(5,2))
print(m1 <- lmer(yield ~ endpoint + (1|Sample), Gasoline), corr = FALSE)
m2 <- lmer(yield ~ endpoint + (endpoint|Sample), Gasoline, verbose = 1)
print(m2)
Gasoline$endptC <- with(Gasoline, endpoint - mean(endpoint))
m3 <- lmer(yield ~ endpoint + (endptC|Sample), Gasoline, verbose = 1)
print(m3)
xyplot(endptC ~ `(Intercept)`, ranef(m3)[[1]], type = c("g", "p", "r"),
       aspect = 1)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(MEMSS)
Loading required package: lme4
Loading required package: Matrix

Attaching package: 'MEMSS'

The following objects are masked from 'package:datasets':

    CO2, Orange, Theoph

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MEMSS/Gasoline.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Gasoline
> ### Title: Refinery yield of gasoline
> ### Aliases: Gasoline
> ### Keywords: datasets
> 
> ### ** Examples
> 
> require(lattice)
Loading required package: lattice
> str(Gasoline)
'data.frame':	32 obs. of  6 variables:
 $ yield   : num  6.9 14.4 7.4 8.5 8 2.8 5 12.2 10 15.2 ...
 $ endpoint: num  235 307 212 365 218 235 285 205 267 300 ...
 $ Sample  : Factor w/ 10 levels "A","B","C","D",..: 5 6 8 1 7 9 4 10 3 5 ...
 $ API     : num  38.4 40.3 40 31.8 40.8 41.3 38.1 50.8 32.2 38.4 ...
 $ vapor   : num  6.1 4.8 6.1 0.2 3.5 1.8 1.2 8.6 5.2 6.1 ...
 $ ASTM    : num  220 231 217 316 210 267 274 190 236 220 ...
> xyplot(yield ~ endpoint | Sample, Gasoline, aspect = 'xy',
+        main = "Gasoline data", xlab = "Endpoint (degrees F)",
+        ylab = "Percentage yield",
+        type = c("g", "p", "r"),
+        index.cond = function(x,y) coef(lm(y~x))[2],
+        layout = c(5,2))
> print(m1 <- lmer(yield ~ endpoint + (1|Sample), Gasoline), corr = FALSE)
Linear mixed model fit by REML ['lmerMod']
Formula: yield ~ endpoint + (1 | Sample)
   Data: Gasoline
REML criterion at convergence: 175.4306
Random effects:
 Groups   Name        Std.Dev.
 Sample   (Intercept) 8.388   
 Residual             1.880   
Number of obs: 32, groups:  Sample, 10
Fixed Effects:
(Intercept)     endpoint  
   -33.3063       0.1576  
> m2 <- lmer(yield ~ endpoint + (endpoint|Sample), Gasoline, verbose = 1)
start par. =  1 0 1 fn =  245.9101 
At return
eval: 1092 fn:      172.77421 par:  2.71213 0.00570257 2.84912e-08
> print(m2)
Linear mixed model fit by REML ['lmerMod']
Formula: yield ~ endpoint + (endpoint | Sample)
   Data: Gasoline
REML criterion at convergence: 172.7742
Random effects:
 Groups   Name        Std.Dev. Corr
 Sample   (Intercept) 4.82360      
          endpoint    0.01014  1.00
 Residual             1.77852      
Number of obs: 32, groups:  Sample, 10
Fixed Effects:
(Intercept)     endpoint  
   -31.9898       0.1545  
> Gasoline$endptC <- with(Gasoline, endpoint - mean(endpoint))
> m3 <- lmer(yield ~ endpoint + (endptC|Sample), Gasoline, verbose = 1)
start par. =  1 0 1 fn =  270.7726 
At return
eval: 2075 fn:      172.77421 par:  4.60576 0.00570232  0.00000
> print(m3)
Linear mixed model fit by REML ['lmerMod']
Formula: yield ~ endpoint + (endptC | Sample)
   Data: Gasoline
REML criterion at convergence: 172.7742
Random effects:
 Groups   Name        Std.Dev. Corr
 Sample   (Intercept) 8.19154      
          endptC      0.01014  1.00
 Residual             1.77854      
Number of obs: 32, groups:  Sample, 10
Fixed Effects:
(Intercept)     endpoint  
   -31.9898       0.1545  
> xyplot(endptC ~ `(Intercept)`, ranef(m3)[[1]], type = c("g", "p", "r"),
+        aspect = 1)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>