ebarraysFamily-class        package:EBarrays        R Documentation

_C_l_a_s_s _o_f _F_a_m_i_l_i_e_s _t_o _b_e _u_s_e_d _i_n _t_h_e _E_B_a_r_r_a_y_s _p_a_c_k_a_g_e

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

     Objects used as family in the 'emfit' function. 

     The package contains two functions that create such objects for
     the two most commonly used families, Gamma-Gamma and
     Lognormal-Normal. Users may create their own famiies as well.

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

     eb.createFamilyGG()
     eb.createFamilyLNN()

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

     The 'emfit' function can potentially fit models corresponding to
     several different Bayesian conjugate families. This is specified
     as the 'family' argument, which ultimately has to be an object of
     formal class ``ebarraysFamily'' with some specific slots that
     determine the behaviour of the `family'.

     For users who are content to use the predefined GG and LNN models,
     no further details than that given in the documentation for
     'emfit' are necessary. If you wish to create your own families,
     read on.

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

     Objects of class ``ebarraysFamily'' for the two predefined
     families Gamma-Gamma and Lognormal-Normal

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects of class ``ebarraysFamily'' can be created by calls of the
     form 'new("ebarraysFamily", ...)'. Predefined objects
     corresponding to the GG and LNN models can be created by
     'eb.createFamilyGG()' and 'eb.createFamilyLNN()'. The same effect
     is achieved by coercing from the strings '"GG"' and '"LNN"' by
     'as("GG", "ebarraysFamily")' and 'as("LNN", "ebarraysFamily")'.

_S_l_o_t_s:

     An object of class ``ebarraysFamily'' extends the class
     '"character"' (representing a short hand name for the class) and
     should have the following slots (for more details see the source
     code):

     '_d_e_s_c_r_i_p_t_i_o_n': A not too long character string describing the
          family

     '_l_i_n_k': function that maps user-visible parameters to the
          parametrization that would be used in the optimization step
          (e.g. 'log(sigma^2)' for LNN). This allows the user to think
          in terms of familiar parametrizations that may not
          necessarily be the best when optimizing w.r.t. those
          parameters.

     '_i_n_v_l_i_n_k': inverse of the link function

     '_t_h_e_t_a_I_n_i_t': function of a single argument 'data' (matrix
          containing raw expression values), that calculates and
          returns as a numeric vector initial estimates of the
          parameters (in the parametrization used for optimization)

     '_f_0': function taking arguments 'theta' and a list called 'args'.
          'f0' calculates the negative log likelihood at the given
          parameter value 'theta' (again, in the parametrization used
          for optimization). This is called from 'emfit'. When called,
          only genes with positive intensities across all samples are
          used.

     '_f_0._p_p': 'f0.pp' is essentially the same as 'f0' except the terms
          common to the numerator and denominator when calculating
          posterior odds may be removed. It is called from 'postprob'.

     '_f_0._a_r_g_l_i_s_t': function that takes arguments 'data' and 'patterns'
          (of class ``ebarraysPatterns'') and returns a list with two
          components, 'common.args' and 'pattern.args'. 'common.args'
          is a list of arguments to 'f0' that don't change from one
          pattern to another, whereas 'pattern.args[[i]][[j]]' is a
          similar list of arguments, but specific to the columns in
          'pattern[[i]][[j]]'. Eventually, the two components will be
          combined for each pattern and used as the 'args' argument to
          'f0'.

     '_l_o_g_D_e_n_s_i_t_y': function of two arguments 'x' (data vector,
          containing log expressions) and 'theta' (parameters in
          user-visible parametrization). Returns log marginal density
          of the natural log of intensity for the corresponding
          theoretical model. Used in 'plotMarginal'

     '_l_o_w_e_r._b_o_u_n_d': vector of lower bounds for the argument 'theta' of
          'f0'. Used in 'optim'

     '_u_p_p_e_r._b_o_u_n_d': vector of upper bounds for the argument 'theta' of
          'f0'. 


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

     Christina Kendziorski, Michael Newton and Deepayan Sarkar

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

     'emfit', 'optim', 'plotMarginal'

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

     show(eb.createFamilyGG())
     show(eb.createFamilyLNN())

