nem                   package:nem                   R Documentation

_N_e_s_t_e_d _E_f_f_e_c_t_s _M_o_d_e_l_s - _m_a_i_n _f_u_n_c_t_i_o_n

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

     The main function to infer a phenotypic hierarchy from data

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

     nem(D,inference="nem.greedy",models=NULL,type="mLL",para=NULL,hyperpara=NULL,Pe=NULL,Pm=NULL,Pmlocal=NULL,local.prior.size=length(unique(colnames(D))),local.prior.bias=1,triples.thrsh=0.5,lambda=0,delta=1,selEGenes=FALSE,verbose=TRUE)

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

       D: data matrix with experiments in the columns (binary or
          continious)

inference: 'search' to use exhaustive enumeration; or 'triples' for
          triple-based inference; or 'pairwise' for the pairwise
          heuristic; or 'ModuleNetwork' for the module based inference

  models: a list of adjacency matrices for model search. If NULL,
          'enumerate.models' is used for exhaustive enumeration of all
          possible models.

    type: 'mLL' or 'FULLmLL' or 'CONTmLL' or 'CONTmLLDens' or
          'CONTmLLRatio'

    para: vector of length two: false positive rate and false negative
          rate for non-binary data. Used by 'mLL'

hyperpara: vector of length four: used by 'FULLmLL()' for binary data

      Pe: prior of effect reporter positions in the phenotypic
          hierarchy (same dimension as D)

      Pm: prior over models (n x n matrix)

 Pmlocal: local model prior for pairwise and triple learning. For
          pairwise learning generated by 'local.model.prior()'
          according to arguments 'local.prior.size' and
          'local.prior.bias'

local.prior.size: prior expected number of edges in the graph (for
          pairwise learning)

local.prior.bias: bias towards double-headed edges. Default: 1 (no
          bias; for pairwise learning)

triples.thrsh: threshold for model averaging to combine triple models
          for each edge

  lambda: regularization parameter to incorporate prior assumptions.
          Default: 0 (no regularization)

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

selEGenes: automated E-gene subset selection (includes tuning of delta
          for CONTmLLRatio)

 verbose: do you want to see progression statements? Default: TRUE

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

     'nem' is an interface to the functions 'score',
     'pairwise.posterior', 'triple.posterior', 'moduleNetwork' and
     'nem.greedy'.  If Pm != NULL and lambda == 0, a Bayesian approach
     to include prior knowledge is used, which is the recommended
     method. Alternatively the regularization parameter lambda can be
     tuned in a model selection step via the function
     'nemModelSelection' using the AIC criterion.  If automated E-gene
     subset selection is used and type == CONTmLLRatio, the
     regularization parameter delta is tuned via the AIC model
     selection criterion. Otherwise, an iterative algorithm is
     executed, which in an alternating optimization scheme reconstructs
     a network given the current set of E-gene and then selects the
     E-genes having the highest likelihood under the given network. The
     procedure is run until convergence.

     The function 'plot.nem' plots the inferred phenotypic hierarchy as
     a directed graph, the likelihood distribution of the models (only
     for exhaustive search) or the posterior position of the effected
     genes.

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

   graph: the inferred directed graph (graphNEL object)

     mLL: marginal likelihood of final model

     pos: posterior over effect positions

  mappos: MAP estimate of effect positions

    type: as used in function call

    para: as used in function call

hyperpara: as used in function call

  lambda: as in function call

selected: selected E-gene subset

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

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

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

     'nemModelSelection', 'score', 'moduleNetwork', 'nem.greedy',
     'triples.posterior', 'pairwise.posterior', 'local.model.prior',
     'enumerate.models', 'plot.nem'

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

        data("BoutrosRNAi2002")
        D <- BoutrosRNAiDiscrete[,9:16]
        p <- c(.13,.05)
        res1 <- nem(D,para=p,inference="search")
        res2 <- nem(D,para=p,inference="pairwise")
        res3 <- nem(D,para=p,inference="triples")
        res4 <- nem(D,para=p,inference="ModuleNetwork")
        res5 <- nem(D,para=p,inference="nem.greedy")
        

        par(mfrow=c(1,4))
        plot(res1,main="exhaustive search")
        plot(res2,main="pairs")
        plot(res3,main="triples")
        plot(res4,main="module network")
        plot(res5,main="greedy hillclimber")
        

