stepfor               package:maSigPro               R Documentation

_F_i_t_t_i_n_g _a _l_i_n_e_a_r _m_o_d_e_l _b_y _f_o_r_w_a_r_d-_s_t_e_p_w_i_s_e _r_e_g_r_e_s_s_i_o_n

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

     'stepfor' fits a linear regression model applying forward-stepwise
     strategy.

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

     stepfor(y = y, d = dis, alfa = 0.05)

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

       y: dependent variable 

       d: data frame containing by columns the set of variables that
          could be in the selected model 

    alfa: significance level to decide if a variable stays or not in
          the model

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

     The strategy begins analysing all the possible models with only
     one of the variables included in 'd'.  The most statistically
     significant variable (with the lowest p-value) is included in the
     model and  then it is considered to introduce in the model another
     variable analysing all the possible models  with two variables
     (the selected variable in the previous step plus a new variable).
     Again the most  statistically significant variable (with lowest
     p-value) is included in the model. The process is  repeated till
     there are no more statistically significant variables to include.

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

     'stepfor' returns an object of the class 'lm', where the model
     uses  'y' as dependent variable and all the selected variables
     from 'd' as independent variables. 

     The function 'summary' are used to obtain a summary and analysis
     of variance table of the results.  The generic accessor functions
     'coefficients', 'effects', 'fitted.values' and 'residuals' extract
     various useful features of the value returned by 'lm'.

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

     Ana Conesa, aconesa@ivia.es; Mara Jos Nueda, mj.nueda@ua.es

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

     Conesa, A., Nueda M.J., Alberto Ferrer, A., Taln, T. 2005.
     maSigPro: a Method to Identify Significant Differential Expression
     Profiles in Time-Course Microarray Experiments.

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

     'lm', 'step', 'stepback', 'two.ways.stepback', 'two.ways.stepfor'

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

     ## create design matrix
     Time <- rep(c(rep(c(1:3), each = 3)), 4)
     Replicates <- rep(c(1:12), each = 3)
     Control <- c(rep(1, 9), rep(0, 27))
     Treat1 <- c(rep(0, 9), rep(1, 9), rep(0, 18))
     Treat2 <- c(rep(0, 18), rep(1, 9), rep(0,9))
     Treat3 <- c(rep(0, 27), rep(1, 9))
     edesign <- cbind(Time, Replicates, Control, Treat1, Treat2, Treat3)
     rownames(edesign) <- paste("Array", c(1:36), sep = "")
     dise <- make.design.matrix(edesign)
     dis <- as.data.frame(dise$dis)

     ## expression vector
     y <- c(0.082, 0.021, 0.010, 0.113, 0.013, 0.077, 0.068, 0.042, -0.056, -0.232, -0.014, -0.040, 
     -0.055, 0.150, -0.027, 0.064, -0.108, -0.220, 0.275, -0.130, 0.130, 1.018, 1.005, 0.931,
      -1.009, -1.101, -1.014, -0.045, -0.110, -0.128, -0.643, -0.785, -1.077, -1.187, -1.249, -1.463)

     s.fit <- stepfor(y = y, d = dis)
     summary(s.fit)

