engineVertexNS {dnr}R Documentation

Simulation Engine for dynamic Vertex case without smoothing of estimated predictor matrices.

Description

Simulation engine for dynamic networks with variable number of vertices. Implements exponential family based hierarchical model for vertices and the edges. This does not implement smoothing for estimated predictor matrices.

Usage

engineVertexNS(
  InputNetwork,
  numSim,
  maxLag,
  VertexStatsvec = rep(1, nvertexstats),
  VertexLag = rep(1, maxLag),
  VertexLagMatrix = matrix(1, maxLag, length(VertexStatsvec)),
  VertexModelGroup = NA,
  VertexAttLag = rep(1, maxLag),
  dayClassObserved = NA,
  dayClassFuture = NA,
  EdgeModelTerms,
  EdgeModelFormula,
  EdgeGroup = NA,
  EdgeIntercept = c("edges"),
  EdgeNetparam = NA,
  EdgeExvar = NA,
  EdgeLag = rep(1, maxLag),
  EdgeLagMatrix = matrix(1, maxLag, length(EdgeModelTerms)),
  regMethod = "bayesglm",
  paramout = TRUE
)

Arguments

InputNetwork

List of input networks

numSim

number of time points to simulate

maxLag

maximum Lag

VertexStatsvec

Binary vector for vertex model.

VertexLag

vector of lag for vertex

VertexLagMatrix

matrix of lags for vertex stats.

VertexModelGroup

Group term for vertex model.

VertexAttLag

Lag vector for group term for vertex.

dayClassObserved

Observed day class.

dayClassFuture

Dayclass vector for future, must be of size numsim.

EdgeModelTerms

Edge Model terms

EdgeModelFormula

Edge model formula

EdgeGroup

edge group term

EdgeIntercept

edge intercept

EdgeNetparam

edge network parameter name

EdgeExvar

edge extraneous variable

EdgeLag

edge Lag vector

EdgeLagMatrix

edge lag matrix

regMethod

regression method. "bayesglm" by default

paramout

T/F on if regression needs to run.

Value

List with following elements: SimNetwork: Output Networks
EdgeParameterMat: Matrix of edge parameter
VertexParameterMat: Matrix of Vertex parameters.

Examples

## Not run: 
nvertexstats <- 9
maxLag <- 3
VertexLag <- rep(1, maxLag)
VertexLagMatrix <- matrix(0, maxLag, nvertexstats)
VertexLagMatrix[, c(4, 7)] <- 1
VertexLagMatrix[c(2, 3), ] <- 1
simResult <- suppressWarnings(engineVertexNS(InputNetwork = beach,
                          numSim = 5,
                          maxLag = 3,
                          VertexStatsvec = rep(1, nvertexstats),
                          VertexModelGroup = "regular",
                          VertexAttLag = rep(1, maxLag),
                          VertexLag = rep(1, maxLag),
                          VertexLagMatrix = VertexLagMatrix,
                          EdgeModelTerms = NA,
                          EdgeModelFormula = NA,
                          EdgeGroup = NA,
                          EdgeIntercept = c("edges")
                          ))
## End(Not run)

[Package dnr version 0.3.5 Index]