par2lambda            package:factDesign            R Documentation

_A _f_u_n_c_t_i_o_n _t_o _c_o_n_s_t_r_u_c_t _t_h_e _a_p_p_r_o_p_r_i_a_t_e _l_a_m_b_d_a _m_a_t_r_i_x _f_o_r _a _t_e_s_t _o_f _c_o_n_t_r_a_s_t _o_f _l_i_n_e_a_r _m_o_d_e_l _p_a_r_a_m_e_t_e_r_s.

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

     'par2lambda' takes list of lm coefficient names and a
     corresponding list of numeric vectors corresponding to hypothesis
     tests of linear contrasts and returns a lambda matrix suitable for
     an F-test of the linear contrasts.  'par2lambda' is intended to be
     used in conjunction with 'contrastTest', 'findFC', or 'findFClog'.

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

     par2lambda(betaNames, betas, coefs)

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

betaNames: A character vector of the names of the coefficients in a
          linear model. 

   betas: A list of vectors of the parameters to be used in the
          contrasts. 

   coefs: A list of vectors of numeric coefficients corresponding to
          betas. 

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

     A lambda matrix constructed for testing linear contrasts using lm
     output.

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

     Denise Scholtens

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

     'contrastTest','findFC','findFClog'

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

     data(estrogen)
     ES <- pData(estrogen)[["ES"]]
     TIME <- pData(estrogen)[["TIME"]]
     fit <- lm(exprs(estrogen)[1,] ~ ES + TIME + ES*TIME)
     betaNames <- names(fit[["coef"]])
     betas <- list(c("ESP","ESP:TIME48h"),c("TIME48h","ESP:TIME48h"))
     coefs <- list(c(1,1),c(1,1))
     par2lambda(betaNames,betas,coefs)

