nemModelSelection: Model selection for nested effect models

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/nemModelSelection.R

Description

Infers models with different regularization constants, compares them via the BIC or AIC criterion and returns the highest scoring one

Usage

1
nemModelSelection(lambdas,D,inference="nem.greedy",models=NULL,control=set.default.parameters(unique(colnames(D))),verbose=TRUE,...)

Arguments

lambdas

vector of regularization constants

D

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

inference

search to use exhaustive enumeration, triples for triple-based inference, pairwise for the pairwise heuristic, ModuleNetwork for the module based inference, nem.greedy for greedy hillclimbing, nem.greedyMAP for alternating MAP optimization using log odds or log p-value densities

models

a list of adjacency matrices for model search. If NULL, an exhaustive enumeration of all possible models is performed.

control

list of parameters: see set.default.parameters

verbose

do you want to see progression statements? Default: TRUE

...

other arguments to pass to function nem or network.AIC

Details

nemModelSelection internally calls nem to infer a model with a given regularization constant. The comparison between models is based on the BIC or AIC criterion, depending on the parameters passed to network.AIC.

Value

nem object

Author(s)

Holger Froehlich

See Also

set.default.parameters, nem, network.AIC

Examples

1
2
3
4
5
6
   data("BoutrosRNAi2002")
   D <- BoutrosRNAiDiscrete[,9:16]   
   hyper = set.default.parameters(unique(colnames(D)), para=c(0.13, 0.05), Pm=diag(4))
   res <- nemModelSelection(c(0.1,1,10), D, control=hyper)      
   
   plot.nem(res,main="highest scoring model")      

Example output

Greedy hillclimber for 4 S-genes (lambda = 0.1 )...

Computing (marginal) likelihood for 1 models
--> Using regularization to incorporate prior knowledge
12  local models to test ...
Computing (marginal) likelihood for 12 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 20.75064 )
--> Edge added, removed or reversed
12  local models to test ...
Computing (marginal) likelihood for 12 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 1.486884 )
--> Edge added, removed or reversed
11  local models to test ...
Computing (marginal) likelihood for 11 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 0.4669048 )
--> Edge added, removed or reversed
10  local models to test ...
Computing (marginal) likelihood for 10 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 15.02184 )
--> Edge added, removed or reversed
5  local models to test ...
Computing (marginal) likelihood for 5 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 82.00684 )
log-likelihood of model =  -288.0096 
Greedy hillclimber for 4 S-genes (lambda = 1 )...

Computing (marginal) likelihood for 1 models
--> Using regularization to incorporate prior knowledge
12  local models to test ...
Computing (marginal) likelihood for 12 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 20.75064 )
--> Edge added, removed or reversed
12  local models to test ...
Computing (marginal) likelihood for 12 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 1.486884 )
--> Edge added, removed or reversed
11  local models to test ...
Computing (marginal) likelihood for 11 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 1.366905 )
--> Edge added, removed or reversed
10  local models to test ...
Computing (marginal) likelihood for 10 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 13.22184 )
--> Edge added, removed or reversed
5  local models to test ...
Computing (marginal) likelihood for 5 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 83.80684 )
log-likelihood of model =  -255.6682 
Greedy hillclimber for 4 S-genes (lambda = 10 )...

Computing (marginal) likelihood for 1 models
--> Using regularization to incorporate prior knowledge
12  local models to test ...
Computing (marginal) likelihood for 12 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 20.75064 )
--> Edge added, removed or reversed
12  local models to test ...
Computing (marginal) likelihood for 12 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 1.486884 )
--> Edge added, removed or reversed
11  local models to test ...
Computing (marginal) likelihood for 11 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 10.3669 )
--> Edge added, removed or reversed
10  local models to test ...
Computing (marginal) likelihood for 10 models
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
--> Using regularization to incorporate prior knowledge
((Marginal) posterior likelihood difference of best vs. second best model for  rel key tak mkk4hep : 4.778158 )
log-likelihood of model =  -259.0487 
==> AIC ( lambda =   ) =  487.532817873473 ( #param = 5 )===============
==> AIC ( lambda =   ) =  487.532817873473 ( #param = 5 )===============
==> AIC ( lambda =   ) =  509.543078495049 ( #param = 3 )===============
====> chosen best model with lambda = 0.1 

nem documentation built on Oct. 31, 2019, 2:12 a.m.