remlscore              package:statmod              R Documentation

_R_E_M_L _f_o_r _h_e_t_e_r_o_s_c_e_d_a_s_t_i_c _r_e_g_r_e_s_s_i_o_n

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

     Fits a heteroscedastic regression model using residual maximum
     likelihood (REML).

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

     remlscore(y, X, Z, 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

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

     tol: Convergence tolerance

   maxit: Maximum number of iterations allowed

_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 variances

deviance: Minus twice the REML log-likelihood

       h: Leverages

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

     Smyth, G. K. (2002). An efficient algorithm for REML in
     heteroscedastic regression. _Journal of Computational and
     Graphical Statistics_ *11*, 1-12.

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

     data(welding)
     attach(welding)
     y <- Strength
     # Reproduce results from Table 1 of Smyth (2002)
     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 <- remlscore(y,X,Z)
     cbind(Estimate=out$gamma,SE=out$se.gam)

