LMEgradient               package:lme4               R Documentation

_T_h_e _g_r_a_d_i_e_n_t _a_n_d _H_e_s_s_i_a_n _i_n _l_m_e _o_p_t_i_m_i_z_a_t_i_o_n-_m_e_t_h_o_d

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

     The LMEgradient and LMEhessian generic functions return the
     gradient and the Hessian of the log-likelihood or
     log-restricted-likelihood in an lme model with respect to the
     parameters of the object represented by `x'.

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

     LMEgradient(x, A, nlev)
     LMEhessian(x, A, H, nlev)

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

       x: a parameterized component of an lme model, usually the
          precision matrix of an `lmeLevel'.  Such precision matrices
          inherit from the `pdMat' class.

       A: an upper triangular matrix with the same number of columns as
          the matrix represented by `x'

       H: an array of four dimensions with each dimension same as the
          number of columns of the matrix represented by `x'

    nlev: integer: the number of levels of the grouping factor
          corresponding to the random-effects structure

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

     LMEgradient returns a numeric vector of length `length(coef(x))'.

     LMEhessian returns a symmetric matrix with number of columns
     `length(coef(x))'.

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

     Douglas Bates bates@stat.wisc.edu and Saikat DebRoy
     saikat@stat.wisc.edu

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

     `pdMat-class', `lmeLevel-class'

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

     library(lme4)
     data(Oxboys, package = "nlme")
     m3 <- pdLogChol(~ age)
     as(m3, 'pdmatrix') <- crossprod(model.matrix(formula(m3), Oxboys))
     LMEgradient(m3, diag(2), 19)

