Learn R Programming

ebdbNet (version 1.2.1)

simFunc: Simulate Simple Autoregressive Process

Description

Function to simulate a simple autoregressive process based on a network adjacency matrix with a given percentage of non-zero elements.

Usage

simFunc(R, T, P, v, perc)

Arguments

R
Number of replicates
T
Number of time points
P
Number of observations (genes)
v
(Px1) vector of gene precisions
perc
Percent of non-zero edges in adjacency matrix

Value

  • DtrueAdjacency matrix used to generate data (i.e., the true network)
  • ySimulated data

Details

Data are simulated with R replicates, T time points, and P genes, based on a first-order autoregressive process with Gaussian noise. The user can specify the percentage of non-zero edges to be randomly selected in the adjacency matrix.

See Also

ebdbn

Examples

Run this code
library(ebdbNet)
tmp <- runif(1) ## Initialize random number generator
set.seed(125214) ## Save seed

## Simulate data
simData <- simFunc(R = 5, T = 10, P = 10, v = rep(10, 10), perc = 0.10)
Dtrue <- simData$Dtrue
y <- simData$y

Run the code above in your browser using DataLab