update_dissolution | R Documentation |
Adjusts the dissolution component of a dynamic ERGM fit using
the netest
function with the edges dissolution
approximation method.
update_dissolution(old.netest, new.coef.diss, nested.edapprox = TRUE)
old.netest |
An object of class |
new.coef.diss |
An object of class |
nested.edapprox |
Logical. If |
Fitting an ERGM is a computationally intensive process when the model includes dyad dependent terms. With the edges dissolution approximation method of Carnegie et al, the coefficients for a temporal ERGM are approximated by fitting a static ERGM and adjusting the formation coefficients to account for edge dissolution. This function provides a very efficient method to adjust the coefficients of that model when one wants to use a different dissolution model; a typical use case may be to fit several different models with different average edge durations as targets. The example below exhibits that case.
An updated network model object of class netest
.
## Not run:
nw <- network_initialize(n = 1000)
# Two dissolutions: an average duration of 300 versus 200
diss.300 <- dissolution_coefs(~offset(edges), 300, 0.001)
diss.200 <- dissolution_coefs(~offset(edges), 200, 0.001)
# Fit the two reference models
est300 <- netest(nw = nw,
formation = ~edges,
target.stats = c(500),
coef.diss = diss.300)
est200 <- netest(nw = nw,
formation = ~edges,
target.stats = c(500),
coef.diss = diss.200)
# Alternatively, update the 300 model with the 200 coefficients
est200.compare <- update_dissolution(est300, diss.200)
identical(est200$coef.form, est200.compare$coef.form)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.