Implementation of simulation engine for dynamic networks without using smoothing estimates of change statistics.
engineEdgeNS( start_network, inputcoeff, ns, model.terms, model.formula, graph_mode, group, intercept, exvar, maxlag, lagmat, ylag, lambda = NA, method = "bayesglm", alpha.glmnet, paramout = TRUE )
start_network
: Initial list of networksinputcoeff
: coefficient vectorns
: number of time points for simulationmodel.terms
: model terms in formulamodel.formula
: model formula (ergm)graph_mode
: 'digraph' by defaultgroup
: group termsintercept
: intercept termsexvar
: extraneous covariatesmaxlag
: maximum laglagmat
: lag matrixylag
: lag vector for network lag termslambda
: NAmethod
: 'bayesglm' by defaultalpha.glmnet
: NAparamout
: T/F parameter estimation is returned.list: out_network: list of predicted networks coefmat: if paramout is TRUE, matrix of coefficients at all time.
## Not run: input_network=rdNets[1:6]; model.terms=c("triadcensus.003", "triadcensus.012", "triadcensus.102", "triadcensus.021D", "gwesp"); model.formula = net~triadcensus(0:3)+gwesp(decay=0, fixed=FALSE, cutoff=30)-1; graph_mode='digraph'; group='dnc'; alpha.glmnet=1 directed=TRUE; method <- 'bayesglm' maxlag <- 3 lambda=NA intercept = c("edges") cdim <- length(model.terms) lagmat <- matrix(sample(c(0,1),(maxlag+1)*cdim,replace = TRUE),ncol = cdim) ylag <- rep(1,maxlag) lagmat[1,] <- rep(0,ncol(lagmat)) out <- paramEdge(input_network,model.terms, model.formula, graph_mode="digraph",group,intercept = c("edges"),exvar=NA, maxlag = 3, lagmat = lagmat, ylag = rep(1,maxlag), lambda = NA, method='bayesglm', alpha.glmnet=1) # start_network <- input_network inputcoeff <- out$coef$coef nvertex <- 47 ns <- 10 exvar <- NA tmp <- suppressWarnings(engineEdgeNS(start_network=start_network, inputcoeff=inputcoeff,ns=ns, model.terms=model.terms, model.formula=model.formula, graph_mode=graph_mode,group=group,intercept=intercept, exvar=exvar, maxlag=maxlag, lagmat=lagmat, ylag=ylag, lambda = NA, method='bayesglm', alpha.glmnet=alpha.glmnet)) ## End(Not run)
Abhirup
Useful links