stam.fit                package:stam                R Documentation

_F_i_t _S_t_A_M _M_o_d_e_l _t_o _T_r_a_i_n_i_n_g _D_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     Using the whole expression data provided fit one StAM model 
     according to the chosen shrinkage level.

_U_s_a_g_e:

     stam.fit(cv, expression.matrix, collapse.scnodes = FALSE, 
              alpha = 0.5, delta = NULL, max.nodes = 100)

_A_r_g_u_m_e_n_t_s:

      cv: result stam.cv on the same data, must be of class 'stamCV'

expression.matrix: holds the expression levels. It may be of class
          'exprSet' or 'ExpressionSet', or a plain numeric matrix. In
          the first case 'exprs' is used to extract the  expression
          levels. The matrix is expected to hold one column per sample
          and one row per probeset.

collapse.scnodes: if set to TRUE replace single children nodes after
          shrinkage

   alpha: root performance vs. mean redundancy weight. If set to NULL
          the root error rate is used exclusively to determine the best
          shrinkage level. If a numeric vector  is provided, all
          alternatives are computed and the user is given an
          interactive  choice. Values between 0 and 1 are valid, 0
          meaning exclusive weight on redundancy  and 1 putting
          exclusive weight on performance.

   delta: overrule alpha and set shrinkage level explicitely.

max.nodes: choose default shrinkage level such that no more than this
          number of  nodes remain after shrinkage. 

_D_e_t_a_i_l_s:

     In a first step 'stam.fit' must choose a shrinkage level. In order
     to do so it  uses results stored in the cv. If the user provides a
     shrinkage level explicitly this  'delta' is used. If he specifies
     a single weighting factor 'alpha' the  corresponding weighted
     score is used to determine the best shrinkage level. If  'alpha'
     is set to a vector of values, the corresponding scores are
     computed and a  default 'delta' is suggested using the median
     value of the 'alphas'. If this  shrinkage level leads to more than
     'max.nodes' nodes remaining the shrinkage level is increase until
     no more than 'max.nodes' remain after shrinkage.

     Using the thus determined shrinkage level a weighting of nodes is
     computed using the  leaf node results from 'cv'. Thereby, the
     whole dataset supplied is used.

_V_a_l_u_e:

     An object of class stamFit is returned. You may use the print and
     plot methods  to further investigate the returned value.

_A_u_t_h_o_r(_s):

     Claudio Lottaz

_S_e_e _A_l_s_o:

     'stam.cv', 'stamFit-class', 'plot.stamFit',  'stam.graph.plot',
     'stam.writeHTML'

_E_x_a_m_p_l_e_s:

     ## Not run: 
     # prepare data
     library(golubEsets)
     data(Golub_Merge)

     # load and prepare some data
     golubTrain <- Golub_Merge[,1:38]
     data(golubTrain.cv)

     # compute fit
     golubTrain.fit <- stam.fit(golubTrain.cv, golubTrain, alpha=seq(0, 1, 0.1))

     # investigate
     print(golubTrain.fit)
     plot(golubTrain.fit)
     ## End(Not run)

     # show clickable web-page
     ## Not run: 
     map <- stam.graph.plot(golubTrain.fit, outfile="golubTrain")
     cat("<HTML><BODY><MAP NAME='graph_map'>", map, "</MAP>",
         "<IMG SRC='golubTrain_graph_plot.png' USEMAP='#graph_map'></BODY></HTML>\n", 
         file="graph_plot.html")
     browseURL(paste("file://", getwd(), "/graph_plot.html", sep=""))
     ## End(Not run)

