paramEdge: Parameter estimation for static vertex case.

Description Usage Arguments Value Author(s) Examples

View source: R/paramest.R

Description

Parameter estimation for the static vertex case.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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

 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
## 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)

SSDALab/dnr documentation built on Dec. 28, 2020, 8:02 a.m.