enumerate.models: Exhaustive enumeration of models

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

View source: R/enumerate.models.R

Description

The function enumerate.models is used to create the model space for inference by exhaustive enumeration. It computes a list of all transitively closed directed graphs on a given number of nodes.

Usage

1
enumerate.models(x,name=NULL,trans.close=TRUE,verbose=TRUE) 

Arguments

x

either the number of nodes or a vector of node names.

name

optionally the nodenames, if they are not provided in x

trans.close

should graphs be transitively closed?

verbose

if TRUE outputs number of (unique) models. Default: TRUE

Details

The model space of Nested Effects Models consists of all transitively closed directed graphs. The function enumerate.models creates them in three steps: (1.) build all directed graphs on x (or length(x)) nodes, (2.) transitively close each one of them, and (3.) remove redundant models to yield a unique set. So far, enumeration is limited to up to 5 nodes.

I'm aware that this is inefficient! It would be very desirable to enumerate the models directly (i.e. without creating all directed graphs as an intermediate step).

Value

a list of models. Each entry is a transitively closed adjacency matrix with unit main diagonal.

Author(s)

Florian Markowetz

See Also

nem

Examples

1
2
enumerate.models(2)
enumerate.models(c("Anna","Bert"))

Example output

Generated 4 unique models ( out of 4 )
[[1]]
  a b
a 1 0
b 0 1

[[2]]
  a b
a 1 1
b 0 1

[[3]]
  a b
a 1 0
b 1 1

[[4]]
  a b
a 1 1
b 1 1

Generated 4 unique models ( out of 4 )
[[1]]
     Anna Bert
Anna    1    0
Bert    0    1

[[2]]
     Anna Bert
Anna    1    1
Bert    0    1

[[3]]
     Anna Bert
Anna    1    0
Bert    1    1

[[4]]
     Anna Bert
Anna    1    1
Bert    1    1

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