model.matrix.reStruct          package:nlme          R Documentation

_r_e_S_t_r_u_c_t _M_o_d_e_l _M_a_t_r_i_x

_D_e_s_c_r_i_p_t_i_o_n:

     The model matrices for each element of 'formula(object)',
     calculated using 'data', are bound together column-wise. When
     multiple grouping levels are present (i.e. when 'length(object) >
     1'), the individual model matrices are combined from innermost (at
     the leftmost position) to outermost (at the rightmost position).

_U_s_a_g_e:

     ## S3 method for class 'reStruct':
     model.matrix(object, data, contrast, ...)

_A_r_g_u_m_e_n_t_s:

  object: an object inheriting from class 'reStruct', representing a
          random effects structure and consisting of a list of 'pdMat'
          objects.

    data: a data frame in which to evaluate the variables defined in
          'formula(object)'.

contrast: an optional named list specifying the contrasts to be used
          for representing the 'factor' variables in 'data'. The
          components names should match the names of the variables in
          'data' for which the contrasts are to be specified. The
          components of this list will be used as the 'contrasts'
          attribute of the corresponding factor. If missing, the
          default contrast specification is used.

     ...: some methods for this generic require additional arguments. 
          None are used in this method.

_V_a_l_u_e:

     a matrix obtained by binding together, column-wise, the model
     matrices for each element of 'formula(object)'.

_A_u_t_h_o_r(_s):

     Jose Pinheiro Jose.Pinheiro@pharma.novartis.com and Douglas Bates
     bates@stat.wisc.edu

_S_e_e _A_l_s_o:

     'model.matrix', 'contrasts', 'reStruct', 'formula.reStruct'

_E_x_a_m_p_l_e_s:

     rs1 <- reStruct(list(Dog = ~day, Side = ~1), data = Pixel)
     model.matrix(rs1, Pixel)

