simulateNetwork {EDISON}  R Documentation 
Generate network and simulate data.
Description
This function generates a random network with structure changepoints (or takes one as input) and simulated data from it using a regression model.
Usage
simulateNetwork(l = 100, min_phase_length = 10, k_bar = 10, q = 10,
lambda_2 = 0.45, noise = 0.25, net = NULL, lambda_3 = 2,
spacing = 0, gauss_weights = FALSE, same = FALSE,
changes = "sequential", fixed = FALSE, cps = NULL, saveFile = NULL)
Arguments
l 
Length of the time series. 
min_phase_length 
Minimum segment length. 
k_bar 
Maximum number of changepoints. 
q 
Number of nodes. 
lambda_2 
Average number of parents for each node in the network (parameter for a Poisson distribution). 
noise 
Standard deviation of the Gaussian observation noise. Can be constant, or segment specific (in which case the number of changepoints needs to be fixed and the noise needs to be a vector of the same length). 
net 
Input network, can be 
lambda_3 
Average number of structure changes between two segments (parameter for a Poisson distribution). 
spacing 

gauss_weights 

same 

changes 

fixed 

cps 
Changepoint locations (if they are fixed). 
saveFile 
If not 
Value
A list with elements:
sim_data 
A matrix of length NumNodes by NumTimepoints containing the simulated data from the regression model. 
epsilon 
Changepoint vector. 
k 
Number of changepoints. 
network 
The network, a list of length NumSegs, where each element is a NumNodes by NumNodes matrix. 
noise 
The standard deviation of the applied Gaussian noise. 
Author(s)
Frank Dondelinger
See Also
Examples
# Generate random network and simulate data with default parameters
dataset = simulateNetwork()
# Generate random network and simulate data with an average of
# 1 change per node among network segments
dataset = simulateNetwork(lambda_3=1)
# Generate random network and simulate data with an average of
# 1 change per node among network segments and standard deviation
# of the Gaussian observation noise 0.5
dataset = simulateNetwork(lambda_3=1, noise=0.5)
# Generate random network with default parameters
network = generateNetwork()
# Simulate data using generated network
dataset = simulateNetwork(net=network)
# Generate random network with 4 changepoints and 15 nodes,
# with changepoints distributed over a timeseries of length 50
network = generateNetwork(l=50, q=15, fixed=TRUE, k_bar=4)
# Simulate data of length 50 using generated network
dataset = simulateNetwork(net=network)