LenthPlot                package:BsMD                R Documentation

_L_e_n_t_h'_s _P_l_o_t _o_f _E_f_f_e_c_t_s

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

     Plot of the factor effects with significance levels based on
     robust estimation of contrast standard errors.

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

     LenthPlot(obj, alpha = 0.05, plt = TRUE, limits = TRUE,
         xlab = "factors", ylab = "effects", faclab = NULL, cex.fac = par("cex.lab"),
         cex.axis=par("cex.axis"), adj = 1, ...)

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

     obj: object of class 'lm' or vector with the factor effects.

   alpha: numeric. Significance level used for the _margin of error_
          (ME) and _simultaneous margin of error_ (SME). See
          Lenth(1989).

     plt: logical. If 'TRUE', a spikes plot with the factor effects is
          displayed. Otherwise, no plot is produced.

  limits: logical. If 'TRUE' ME and SME limits are displayed and
          labeled.

    xlab: character string. Used to label the x-axis. "factors" as
          default.

    ylab: character string. Used to label the y-axis. "effects" as
          default.

  faclab: list with components 'idx' (numeric vector) and 'lab'
          (character vector). The 'idx' entries of effects vector
          (taken from 'obj') are labelled as 'lab'. The rest of the
          effect names are blanked. If 'NULL' all factors are labelled
          using the coefficients' name.

 cex.fac: numeric. Character size used for the factor labels.

cex.axis: numeric. Character size used for the axis.

     adj: numeric between 0 and 1. Determines where to place the "ME"
          (margin of error) and the "SME" (simultaneous margin of
          error) labels (character size of 0.9*'cex.axis'). 0 for
          extreme left hand side, 1 for extreme right hand side.

     ...: extra parameters passed to 'plot'.

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

     If 'obj' is of class 'lm', '2*coef(obj)' is used as factor effect
     with the intercept term removed. Otherwise, 'obj' should be a
     vector with the factor effects. Robust estimate of the contrasts
     standard error is used to calculate _marginal_ (ME) and
     _simultaneous margin of error_ (SME) for the provided significance
     ('1 - alpha') level. See Lenth(1989).  Spikes are used to display
     the factor effects. If 'faclab' is 'NULL', factors are labelled
     with the effects or coefficient names. Otherwise, those
     'faclab\$idx' factors are labelled as 'faclab\$lab'. The rest of
     the factors are blanked.

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

     The function is called mainly for its side effect. It returns a
     vector with the value of alpha used, the estimated PSE, ME and
     SME.

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

     Ernesto Barrios

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

     Lenth, R. V. (1989). "Quick and Easy Analysis of Unreplicated
     Factorials". _Technometrics_ Vol. 31, No. 4. pp. 469-473.

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

     'DanielPlot', 'BsProb' and 'plot.BsProb'

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

     ### Tensile Strength Experiment. Taguchi and Wu. 1980
     library(BsMD)
     # Data
     data(BM86.data,package="BsMD")     # Design matrix and responses
     print(BM86.data)    # from Box and Meyer (1986)

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

     par(mfrow=c(1,2),pty="s")
     DanielPlot(tensileStrength.lm, main = "Daniel Plot")
     LenthPlot(tensileStrength.lm, main = "Lenth's Plot")

