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, Pm=NULL, lambda=0, delta=1, verbose=TRUE, graphClass="graphNEL")

     ## S3 method for class 'score':
     print(x, ...)

     PhiDistr(Phi, Pm, a=1, b=0.5)

_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: 'mLL' or 'FULLmLL' or 'CONTmLL' or 'CONTmLLBayes' or
          'CONTmLLMAP'. 'CONTmLLDens' and 'CONTmLLRatio' are identical
          to 'CONTmLLBayes' and 'CONTmLLMAP' and are still supported
          for compatibility reasons. 'mLL' and 'FULLmLL' are used for
          binary data (see 'BoutrosRNAiDiscrete') and 'CONTmLL' for a
          matrix of effect probabilities. 'CONTmLLBayes' and
          'CONTmLLMAP' are used, if log-odds ratios, p-value densities
          or any other model specifies effect likelihoods.
          'CONTmLLBayes' refers to an inference scheme, were the
          linking positions of E-genes to S-Genes are integrated out,
          and 'CONTmLLMAP' to an inference scheme, were a MAP estimate
          for the linking positions is calculated.

    para: Vector with parameters 'a' and 'b' (for "mLL" with count
          data)

hyperpara: Vector with hyperparameters 'a0', 'b0', 'a1', 'b1' for
          "FULLmLL"

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

      Pm: prior on model graph (n x n matrix) with entries 0 <=
          priorPhi[i,j] <= 1 describing the probability of an edge
          between gene i and gene j.

  lambda: regularization parameter to incorporate prior assumptions.

   delta: regularization parameter for automated E-gene subset
          selection (CONTmLLRatio only)

 verbose: output while running or not

graphClass: output inferred graph either as graphNEL or matrix

       x: nem object

     ...: other arguments to pass

     Phi: adjacency matrix

       a: parameter of the inverse gamma prior for v=1/lambda

       b: parameter of the inverse gamma prior for v=1/lambda

_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"', '"FULLmLL"', '"CONTmLL"' or '"CONTmLLBayes"'
     or '"CONTmLLMAP"'), the corresponding paramters ('para') or
     hyperparameters ('hyperpara'), a prior for phenotype positions
     ('Pe') and model structures 'Pm' with regularization parameter
     'lambda'. If a structure prior 'Pm' is provided, but no
     regularization parameter 'lambda', Bayesian model averaging with
     an inverse gamma prior on 1/lambda is performed.  With type
     "CONTmLLMAP" usually an automated selection of most relevant
     E-genes is performed by introducing a "null" S-gene. The
     corresponding prior probability of leaving out an E-gene is set to
     delta/no. S-genes. 

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

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

     nem object

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

     Holger Froehlich <URL: http://www.dkfz.de/mga2/people/froehlich>,
     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.

[_3] Froehlich H, Fellmann M, Sueltmann H, Poustka A, Beissbarth T:
     Estimating Large Scale Signaling Networks through Nested Effects
     Models from Intervention Effects in Microarray Data.
     Bioinformatics, 1, 2008.

[_4] Froehlich H, Fellmann M, Sueltmann H, Poustka A, Beissbarth T:
     Large Scale Statistical Inference of Signaling Pathways from RNAi
     and Microarray Data, BMC Bioinformatics, 8:386, 2007.

_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(unique(colnames(D)))

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

        # plot scores
        plot(result,what="mLL") 
         
        # plot posterior of E-gene positions according to best model
        plot(result,what="pos")
        
        # MAP estimate of effect positions for the best model
        result$mappos

