remlscoregamma            package:statmod            R Documentation

_A_p_p_r_o_x_i_m_a_t_e _R_E_M_L _f_o_r _g_a_m_m_a _r_e_g_r_e_s_s_i_o_n _w_i_t_h _s_t_r_u_c_t_u_r_e_d _d_i_s_p_e_r_s_i_o_n

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

     Estimates structured dispersion effects using approximate REML
     with gamma responses.

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

     remlscoregamma(y,X,Z,mlink="log",dlink="log",trace=FALSE,tol=1e-5,maxit=40)

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

       y: numeric vector of responses

       X: design matrix for predicting the mean

       Z: design matrix for predicting the variance

   mlink: character string or numeric value specifying link for mean
          model

   dlink: character string or numeric value specifying link for
          dispersion model

   trace: Logical variable. If true then output diagnostic information
          at each iteration.

     tol: Convergence tolerance

   maxit: Maximum number of iterations allowed

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

     Write mu_i=E(y_i) for the expectation of the $i$th response and
     $s_i=\var(y_i)$. We assume the heteroscedastic regression model

                          mu_i=*x*_i^T*beta*


                    log(sigma^2_i)=*z*_i^T*gamma*,

     where $*x*_i$ and $*z*_i$ are vectors of covariates, and $*beta*$
     and $*\gamma*$ are vectors of regression coefficients affecting
     the mean and variance respectively.

     Parameters are estimated by maximizing the REML likelihood using
     REML scoring as described in Smyth (2002).

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

     List with the following components: 

    beta: Vector of regression coefficients for predicting the mean

 se.beta: <Standard errors for beta

   gamma: Vector of regression coefficients for predicting the variance

  se.gam: Standard errors for gamma

      mu: Estimated means

     phi: Estimated dispersions

deviance: Minus twice the REML log-likelihood

       h: Leverages

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

     Smyth, G. K., and Verbyla, A. P. (2002). Leverage adjustments for
     dispersion modelling in generalized nonlinear models.

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

     data(welding)
     attach(welding)
     y <- Strength
     X <- cbind(1,(Drying+1)/2,(Material+1)/2)
     colnames(X) <- c("1","B","C")
     Z <- cbind(1,(Material+1)/2,(Method+1)/2,(Preheating+1)/2)
     colnames(Z) <- c("1","C","H","I")
     out <- remlscoregamma(y,X,Z)

