score                  package:nem                  R Documentation

_C_o_m_p_u_t_e_s _t_h_e _m_a_r_g_i_n_a_l _l_i_k_e_l_i_h_o_o_d _o_f _p_h_e_n_o_t_y_p_i_c _h_i_e_r_a_r_c_h_i_e_s

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

     Function to compute the marginal likelihood of a set of phenotypic
     hierarchies.

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

     score(models, D, type = "mLL", para = NULL, hyperpara = NULL, Pe = NULL, verbose = TRUE)

     # S3 metehods for class 'score'
     plot.score(x, what="graph",remove.singletons=FALSE, PDF=FALSE, filename="nemplot.pdf", ...)
     print.score(x, ...)

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

  models: a list of adjacency matrices with unit main diagonal 

       D: data matrix. Columns correspond to the nodes in the silencing
          scheme. Rows are effect reporters. 

    type: Marginal likelihood "mLL" depending on parameters 'a' and
          'b', or full marginal likelihood "FULLmLL" integrated over
          'a' and 'b' and depending on hyperparameters 'a0', 'a1',
          'b0', 'b1'. 

    para: Vector with parameters 'a' and 'b' 

hyperpara: Vector with hyperparameters 'a0', 'b0', 'a1', 'b1'

      Pe: Prior position of effect reporters. Default: uniform over
          nodes in silencing scheme

 verbose: output while running or not

       x: an object of class 'score'

    what: type of plot: 'graph', 'mLL', or 'pos'. Default: 'graph'

remove.singletons: remove single nodes which are not connected to any
          other node when plotting? Default: FALSE

     PDF: output as pdf file? Default: FALSE

filename: name of the pdf if any. Default: "nemplot.pdf"

     ...: additional arguments for plotting

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

     Scoring models by marginal log-likelihood is implemented in
     function 'score'. Input consists of models and data, the type of
     the score ('"mLL"' or '"FULLmLL"'), the corresponding paramters
     ('para') or hyperparameters ('hyperpara') and a prior for
     phenotype positions ('Pe').

     'score' is usually called from within function 'nem'.

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

   graph: the model with highest marginal likelihood (graphNEL object)

     mLL: vector of marginal likelihoods for all models

     pos: a list of estimated positions of effect reporters for each
          model

  mappos: a list of maximum aposteriori estimates of effect positions
          for each model

    type: as used in function call

    para: as used in function call

hyperpara: as used in function call

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

     Florian Markowetz <URL: http://genomics.princeton.edu/~florian>

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

[_1] Markowetz F, Bloch J, Spang R, Non-transcriptional pathway features
     reconstructed from secondary effects of RNA interference,
     Bioinformatics, 2005

[_2] Markowetz F, Probabilistic Models for Gene Silencing Data, PhD
     thesis, Free University Berlin, 2006

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

     'nem', 'mLL', 'FULLmLL', 'enumerate.models'

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

        # Drosophila RNAi and Microarray Data from Boutros et al, 2002
        data("BoutrosRNAi2002")
        D <- BoutrosRNAiDiscrete[,9:16]

        # enumerate all possible models for 4 genes
        models <- enumerate.models(4,name=unique(colnames(D)))

        # score models with marginal likelihood
        result <- score(models,D,type="mLL",para=c(.13,.05))
        
        # plot graph
        plot(result,what="graph")

        # plot scores
        plot(result,what="mLL") 
         
        # plot posterior of E-gene positions
        plot(result,what="pos")
        
        # MAP estimate of effect positions
        result$mappos[[which.max(result$mLL)]]

