Description Usage Arguments Value Author(s) See Also Examples
This function builds a object "Network" by simulating a matrix of valued adjacencies from a number of vertices, a proportion of edges and the range of the uniform distribution that is used to build the adjacency matrix. An optional vector of labels may be given.
1 | SimulNetworkAdjMatrix(Num,EdgesProp,Range,Labels=1:Num)
|
Num |
number of genes |
EdgesProp |
edges proportion in the network |
Range |
vector with 4 elements specifying range values for the adjacency matrix generation (minimum negative value, maximum negative value, minimum positive value, maximum positive value) |
Labels |
an optional vector of labels for the edges |
a list that contains out$Vertices$Num the number of vertices, out$Vertices$Labels a vector of labels of the vertices, out$Vertices$Regulated a vector of the regulated vertices, out$Edges$Prop the proportion of edges, out$Edges$Num the number of edges, out$AdjMatrix an adjacency matrix (binary) and out$A a valued adjacency matrix.
Lebre Sophie (http://icube-bfo.unistra.fr/en/index.php/Sophie_Lebre),
Chiquet Julien (http://stat.genopole.cnrs.fr/~jchiquet).
SimulGeneExpressionAR1, BuildEdges
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | library(G1DBN)
## number of genes
p <- 10
## the network - adjacency Matrix
MyNet <- SimulNetworkAdjMatrix(p,0.05,c(-1,0,0,1))
MyNet
## initializing the B vector
B <- runif(p,0,0.5)
## initializing the variance of the noise
sigmaEps <- runif(p,0.1,0.8)
## initializing the process Xt
X0 <- B + rnorm(p,0,sigmaEps*10)
## number of time points
n <- 20
## the AR(1) times series process
Xn <- SimulGeneExpressionAR1(MyNet$AdjMatrix,B,X0,sigmaEps,n)
|
Loading required package: MASS
Loading required package: igraph
Attaching package: 'igraph'
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
$Vertices
$Vertices$Num
[1] 10
$Vertices$Labels
[1] 1 2 3 4 5 6 7 8 9 10
$Vertices$Regulated
[1] 1 2 6 7 9 10
$Edges
$Edges$Prop
[1] 0.05
$Edges$Num
[1] 5
$A
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] -0.6419986 0 0 0 0 0 0.0000000 0 0.0000000 0.0000000
[2,] 0.0000000 0 0 0 0 0 0.0000000 0 -0.1727783 0.0000000
[3,] 0.0000000 0 0 0 0 0 0.0000000 0 0.0000000 0.0000000
[4,] 0.0000000 0 0 0 0 0 0.0000000 0 0.0000000 0.0000000
[5,] 0.0000000 0 0 0 0 0 0.0000000 0 0.0000000 0.0000000
[6,] -0.5117220 0 0 0 0 0 -0.3012484 0 0.0000000 0.0000000
[7,] 0.0000000 0 0 0 0 0 0.0000000 0 0.0000000 0.0000000
[8,] 0.0000000 0 0 0 0 0 0.0000000 0 0.0000000 0.0000000
[9,] 0.0000000 0 0 0 0 0 0.0000000 0 0.0000000 0.1929889
[10,] 0.0000000 0 0 0 0 0 0.0000000 0 0.0000000 0.0000000
$AdjMatrix
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] 1 0 0 0 0 0 0 0 0 0
[2,] 0 0 0 0 0 0 0 0 1 0
[3,] 0 0 0 0 0 0 0 0 0 0
[4,] 0 0 0 0 0 0 0 0 0 0
[5,] 0 0 0 0 0 0 0 0 0 0
[6,] 1 0 0 0 0 0 1 0 0 0
[7,] 0 0 0 0 0 0 0 0 0 0
[8,] 0 0 0 0 0 0 0 0 0 0
[9,] 0 0 0 0 0 0 0 0 0 1
[10,] 0 0 0 0 0 0 0 0 0 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.