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 = 25), 
                                  E = seq(min(E), max(E), length = 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")
     })

