DanielPlot               package:BsMD               R Documentation

_N_o_r_m_a_l _P_l_o_t _o_f _E_f_f_e_c_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Normal plot of effects from a two level factorial experiment.

_U_s_a_g_e:

     DanielPlot(fit, code = FALSE, faclab = NULL, block = FALSE,
         datax = TRUE, half = FALSE, pch = "*", cex.lab = par("cex.lab"),
         cex.pch = par("cex.axis"), ...)

_A_r_g_u_m_e_n_t_s:

     fit: object of class 'lm'. Fitted model from 'lm' or 'aov'.

    code: logical. If 'TRUE' labels "A","B", etc are used instead of
          the names of the coefficients (factors).

  faclab: list. If 'NULL' points are labelled accordingly to 'code',
          otherwise 'faclab' should be a list with 'idx' (integer
          vector) and 'lab' (character vector) components. See Details.

   block: logical. If 'TRUE', the first factor is labelled as "BK"
          (block).

   datax: logical. If 'TRUE', the x-axis is used for the factor effects
          the the y-axis for the normal scores. The opposite otherwise.

    half: logical. If 'TRUE', half-normal plot of effects is display.

     pch: numeric or character. Points character.

 cex.lab: numeric. Labels character size.

 cex.pch: numeric. Points character size.

     ...: graphical parameters passed to 'plot'.

_D_e_t_a_i_l_s:

     The two levels design are assumed -1 and 1. Factor effects assumed
     '2*coef(obj)' ((Intercept) removed) are displayed in a 'qqnorm'
     plot with the effects in the x-axis by default. If 'half=TRUE' the
     half-normal plots of effects is plotted as the normal quantiles of
     '0.5*(rank(abs(effects))-0.5)/length(effects)+1' versus
     'abs(effects)'.

_V_a_l_u_e:

     The function returns invisible data frame with columns: 'x', 'y'
     and 'no', for the coordinates and the enumeration of plotted
     points. Names of the factor effects (coefficients) are the row
     names of the data frame.

_A_u_t_h_o_r(_s):

     Ernesto Barrios.

_R_e_f_e_r_e_n_c_e_s:

     C. Daniel (1976). _Application of Statistics to Industrial
     Experimentation._ Wiley.

     Box G. E. P, Hunter, W. C. and Hunter, J. S. (1978). _Statistics
     for Experimenters_. Wiley.

_S_e_e _A_l_s_o:

     'qqnorm', 'LenthPlot'

_E_x_a_m_p_l_e_s:

     ### Injection Molding Experiment. Box et al. 1978.
     library(BsMD)
     # Data
     data(BM86.data,package="BsMD")     # Design matrix and response
     print(BM86.data)    # from Box and Meyer (1986)

     # Model Fitting. Box and Meyer (1986) example 3.
     injectionMolding.lm <- lm(y3 ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9 +
                         X10 + X11 + X12 + X13 + X14 + X15, data = BM86.data)
     print(coef(injectionMolding.lm)) # Model coefficients

     # Daniel Plots
     par(mfrow=c(1,3),oma=c(0,0,1,0),pty="s")
     DanielPlot(injectionMolding.lm, half = TRUE, main = "Half-Normal Plot")
     DanielPlot(injectionMolding.lm, main = "Normal Plot of Effects")
     DanielPlot(injectionMolding.lm,
             faclab = list(idx = c(12,4,13), lab = c(" -H"," VG"," -B")),
             main = "Active Contrasts")

