Learn R Programming

EpiModel (version 2.2.1)

update_dissolution: Adjust Dissolution Component of Network Model Fit

Description

Adjusts the dissolution component of an dynamic ERGM fit using the netest function with the edges dissolution approximation method.

Usage

update_dissolution(old.netest, new.coef.diss, nested.edapprox = TRUE, ...)

Arguments

old.netest

An object of class netest, from the netest function.

new.coef.diss

An object of class disscoef, from the dissolution_coefs function.

nested.edapprox

Is the new dissolution model an initial segment of the formation model in old.netest (not including the appended old dissolution model if old.netest was fit with nested.edapprox = TRUE)? This determines whether the new edapprox is implemented by subtracting the relevant values from the initial formation model coefficients, or by appending the new dissolution terms to the formation model and appending the relevant values to the vector of formation model coefficients.

...

additional arguments passed to other functions

Details

Fitting an ERGM is a computationally intensive process when the model includes dyadic 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.

Examples

Run this code
if (FALSE) {
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)
}

Run the code above in your browser using DataLab