mmps                  package:alr3                  R Documentation

_M_a_r_g_i_n_a_l _m_o_d_e_l _p_l_o_t

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

     For a regression object, plots the response on the vertical axis
     versus a linear combination u of terms in the mean function on the
     horizontal axis.  Added to the plot are a 'loess' smooth for the
     graph, along with a loess smooth from the plot of the fitted
     values on u.

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

     mmps(object,exclude=NULL,layout=NULL,ask,...)

     mmp.lm(object, u = predict(object), mean = TRUE, sd = FALSE, 
        label = deparse(substitute(u)), degree = 1, span = 2/3, 
        colors = c("blue", "red"), ...)

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

  object: A regression object, of type either lm or glm, for which
          there is a 'predict' method defined. 

 exclude: A vector of indices of variables for which a plot is not
          required.  For example, 'c(2,4)' would exclude the second and
          fourth terms in the model, excluding the intercept.

  layout: A reasonable layout for the plots in the window is determined
          by the program.  If you don't like the default you can set
          your own layout:  'c(2,3)' means two rows and three columns.

     ask: If TRUE, ask before clearing the graph window to draw more
          plots.

       u: The quantity to be plotted on the horizontal axis.  The
          default is the predicted values 'predict(object)'.  Can be
          any other vector of length equal to the number of
          observations in the object. 

    mean: If TRUE, compare mean smooths

      sd: If TRUE, compare sd smooths 

   label: label for horizontal axis 

  degree: Degree of the local polynomial, passed to 'loess'.  The usual
          default for 'loess' is 2, but the default here is one.

    span: Span, the smoothing parameter for 'loess'.  

  colors: colors for data and model smooth, respectively 

     ...: additional arguments passed to 'loess' and 'plot' 

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

     'mmp' draws one marginal model plot.  'mmps' draws all marginal
     model plots, versus each of the terms in the model and versus
     fitted values.  'mmps' should not be used if some of the terms in
     the model are factors or interactions.

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

     Used for its side effect of producing plots.

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

     Sanford Weisberg, sandy@stat.umn.edu

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

     S. Weisberg (2005), _Applied Linear Regression_, third edition,
     Wiley, Chapter 8

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

     'loess', 'plot'

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

     data(ufcwc)
     c1 <- lm(Height~Dbh,ufcwc)
     mmp(c1,ufcwc$Dbh,label="Diameter, Dbh",color=c("black","black"))
     mmps(c1)

