ethanol               package:lattice               R Documentation

_E_n_g_i_n_e _e_x_h_a_u_s_t _f_u_m_e_s _f_r_o_m _b_u_r_n_i_n_g _e_t_h_a_n_o_l

_D_e_s_c_r_i_p_t_i_o_n:

     Ethanol fuel was burned in a single-cylinder engine.  For various
     settings of the engine compression and equivalence ratio, the
     emissions of nitrogen oxides were recorded.

_U_s_a_g_e:

     ethanol

_F_o_r_m_a_t:

     A data frame with 88 observations on the following 3 variables.

     _N_O_x Concentration of nitrogen oxides (NO and NO2) in micrograms/J.

     _C Compression ratio of the engine.

     _E Equivalence ratio-a measure of the richness of the air and
          ethanol fuel mixture.

_A_u_t_h_o_r(_s):

     Documentation contributed by Kevin Wright.

_S_o_u_r_c_e:

     Brinkman, N.D. (1981) Ethanol Fuel-A Single-Cylinder Engine Study
     of Efficiency and Exhaust Emissions. _SAE transactions_, *90*,
     1410-1424.

_R_e_f_e_r_e_n_c_e_s:

     Cleveland, William S. (1993). _Visualizing Data_.  Hobart Press,
     Summit, New Jersey.

_E_x_a_m_p_l_e_s:

     ## Constructing panel functions on the fly
     EE <- equal.count(ethanol$E, number=9, overlap=1/4)
     xyplot(NOx ~ C | EE, data = ethanol,
            prepanel = function(x, y) prepanel.loess(x, y, span = 1),
            xlab = "Compression ratio", ylab = "NOx (micrograms/J)",
            panel = function(x, y) {
                panel.grid(h=-1, v= 2)
                panel.xyplot(x, y)
                panel.loess(x,y, span=1)
            },
            aspect = "xy")

     # Wireframe loess surface fit.  See Figure 4.61 from Cleveland.
     require(stats)
     with(ethanol, {
       eth.lo <- loess(NOx ~ C * E, span = 1/3, parametric = "C", 
                       drop.square = "C", family="symmetric")
       eth.marginal <- list(C = seq(min(C), max(C), length.out = 25), 
                            E = seq(min(E), max(E), length.out = 25))
       eth.grid <- expand.grid(eth.marginal)
       eth.fit <- predict(eth.lo, eth.grid)
       wireframe(eth.fit ~ eth.grid$C * eth.grid$E,
                 shade=TRUE,
                 screen = list(z = 40, x = -60, y=0),
                 distance = .1,
                 xlab = "C", ylab = "E", zlab = "NOx")
     })

