findFC              package:factDesign              R Documentation

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

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

     'findFC' constructs a point estimate of fold change using the
     linear model coefficients in an lm object.

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

     findFC(model, lambdaNum, lambdaDenom, logbase=NULL)

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

   model: An lm object.

lambdaNum: A numeric vector of coefficients for the parameters to be
          used in the numerator of the fold change estimate.

lambdaDenom: A numeric vector of coefficients for the parameters to be
          used in the denominator of the fold change estimate.

 logbase: By default, set to NULL.  For log-transformed data, the base
          of the logarithm.  Specify "exp" for natural log-transformed
          data.

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

     'logbase'=NULL if the data have not been log-transformed.  The
     fold change estimate is calculated as the ratio for the parameter
     estimates corresponding to the experimental conditions of
     interest. 

     'logbase'="exp" if the data have been natural log-transformed. 
     The fold change is calculated as the difference in the parameter
     estimates for the two conditions of interest, then exponentiated
     using exp().

     'logbase' can be set to any number, for example 2, for other log
     transforms.  The fold change is calculated as the difference in
     the parameter estimates for the two conditions of interest, then
     exponentiated with 'logbase' as the base.

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

     A point estimate of the fold change between the experimental
     conditions specified in the lambdaNum and lambdaDenom vectors.

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

     Denise Scholtens

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

     'par2lambda'

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

     data(estrogen)
     ES <- pData(estrogen)[["ES"]]
     TIME <- pData(estrogen)[["TIME"]]   
     fit <- lm(exprs(estrogen)["33744_at",] ~ ES + TIME + ES*TIME)
     betaNames <- names(coef(fit))
     betas <- list(c("(Intercept)","ESP","TIME48h","ESP:TIME48h"),
                                             c("(Intercept)","ESP"))
     coefs <- list(c(1,1,1,1),c(1,1))
     lambda <- par2lambda(betaNames,betas,coefs)
     findFC(fit,lambda[1,],lambda[2,],logbase=2)

