Description Usage Arguments Value Author(s) Examples
View source: R/simEdgesNonSmooth.R
Implementation of simulation engine for dynamic networks without using smoothing estimates of change statistics.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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 networks |
inputcoeff |
coefficient vector |
ns |
number of time points for simulation |
model.terms |
model terms in formula |
model.formula |
model formula (ergm) |
graph_mode |
'digraph' by default |
group |
group terms |
intercept |
intercept terms |
exvar |
extraneous covariates |
maxlag |
maximum lag |
lagmat |
lag matrix |
ylag |
lag vector for network lag terms |
lambda |
NA |
method |
'bayesglm' by default |
alpha.glmnet |
NA |
paramout |
T/F parameter estimation is returned. |
list: out_network: list of predicted networks coefmat: if paramout is TRUE, matrix of coefficients at all time.
Abhirup
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.