Estimate a TERGM by MCMC-MLE
Estimate a TERGM by Markov Chain Monte Carlo Maximum Likelihood Estimation
mtergm(formula, constraints = ~., returndata = FALSE, verbose = TRUE, ...)
formula |
Formula for the TERGM. Model construction works like in the
ergm package with the same model terms etc. (for a list of terms, see
|
constraints |
Constraints of the ERGM. See |
returndata |
Return the processed input data instead of estimating and
returning the model? In the |
verbose |
Print details about data preprocessing and estimation settings. |
... |
Further arguments to be handed over to the
|
The mtergm
function computes TERGMs by MCMC MLE (or MPLE with
uncorrected standard errors) via blockdiagonal matrices and structural zeros.
It acts as a wrapper for the ergm package. The btergm
function
is faster than the mtergm
function but is only asymptotically unbiased
the longer the time series. The mtergm
function yields unbiased
estimates and standard errors but may suffer from degeneracy if the model is
not specified in good keeping with the true data-generating process.
Philip Leifeld, Skyler J. Cranmer, Bruce A. Desmarais
Leifeld, Philip, Skyler J. Cranmer and Bruce A. Desmarais (2017): Temporal Exponential Random Graph Models with btergm: Estimation and Bootstrap Confidence Intervals. Journal of Statistical Software 83(6): 1-36. doi: 10.18637/jss.v083.i06.
library("network") set.seed(5) networks <- list() for (i in 1:10) { # create 10 random networks with 10 actors mat <- matrix(rbinom(100, 1, .25), nrow = 10, ncol = 10) diag(mat) <- 0 # loops are excluded nw <- network(mat) # create network object networks[[i]] <- nw # add network to the list } covariates <- list() for (i in 1:10) { # create 10 matrices as covariate mat <- matrix(rnorm(100), nrow = 10, ncol = 10) covariates[[i]] <- mat # add matrix to the list } ## Not run: fit2 <- mtergm(networks ~ edges + istar(2) + edgecov(covariates)) summary(fit2) ## End(Not run) # For examples with real data, see help("knecht") or help("alliances").
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.