paramEdge {dnr} | R Documentation |
Parameter estimation for static vertex case.
Description
Parameter estimation for the static vertex case.
Usage
paramEdge(
input_network,
model.terms,
model.formula,
graph_mode = "digraph",
group,
intercept = c("edges"),
exvar = NA,
maxlag = 3,
lagmat = matrix(sample(c(0, 1), (maxlag + 1) * length(model.terms), replace = T),
ncol = length(model.terms)),
ylag = rep(1, maxlag),
lambda = NA,
method = "glmnet",
alpha.glmnet = 1,
paramout = TRUE
)
Arguments
input_network |
Input network. |
model.terms |
model terms, must be ERGM terms expanded. |
model.formula |
ERGM formula for each time point. |
graph_mode |
'digraph' by default for bidirectional. |
group |
grouping covariates for vertices. |
intercept |
intercept terms. |
exvar |
Extraneous variables |
maxlag |
maximum lag. |
lagmat |
Matrix of dimension (maxlag+1)x(length(model.terms)) |
ylag |
lag vectors of length=maxlag. |
lambda |
NA |
method |
Regression method, default is 'bayesglm' |
alpha.glmnet |
if regularization is used. not needed for bayesglm. |
paramout |
TRUE by default. if parameters are needed. |
Value
list with elements: coef: coefficients mplematfull: full matrix of change statistics mplemat: subset of matrix of change statistics
Author(s)
Abhirup
Examples
## 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)
exvar <- NA
out <- paramEdge(input_network,model.terms, model.formula,
graph_mode='digraph',group,intercept = c("edges"),exvar=NA,
maxlag = 3,
lagmat = matrix(sample(c(0,1),(maxlag+1)*cdim,
replace = TRUE),ncol = cdim),
ylag = rep(1,maxlag),
lambda = NA, method='bayesglm',
alpha.glmnet=1)
## End(Not run)
[Package dnr version 0.3.5 Index]