bergmM {Bergm} | R Documentation |

Function to fit Bayesian exponential random graphs models under missing data using the approximate exchange algorithm.

```
bergmM(
formula,
burn.in = 100,
main.iters = 1000,
aux.iters = 1000,
prior.mean = NULL,
prior.sigma = NULL,
nchains = NULL,
gamma = 0.5,
V.proposal = 0.0025,
seed = NULL,
startVals = NULL,
offset.coef = NULL,
nImp = NULL,
missingUpdate = NULL,
...
)
```

`formula` |
formula; an |

`burn.in` |
count; number of burn-in iterations for every chain of the population. |

`main.iters` |
count; number of iterations for every chain of the population. |

`aux.iters` |
count; number of auxiliary iterations used for network simulation. |

`prior.mean` |
vector; mean vector of the multivariate Normal prior. By default set to a vector of 0's. |

`prior.sigma` |
square matrix; variance/covariance matrix for the multivariate Normal prior. By default set to a diagonal matrix with every diagonal entry equal to 100. |

`nchains` |
count; number of chains of the population MCMC. By default set to twice the model dimension (number of model terms). |

`gamma` |
scalar; parallel adaptive direction sampling move factor. |

`V.proposal` |
count; diagonal entry for the multivariate Normal proposal. By default set to 0.0025. |

`seed` |
count; random number seed for the Bergm estimation. |

`startVals` |
vector; optional starting values for the parameter estimation. |

`offset.coef` |
vector; A vector of coefficients for the offset terms. |

`nImp` |
count; number of imputed networks to be returned. If null, no imputed network will be returned. |

`missingUpdate` |
count; number of tie updates in each imputation step. By default equal to number of missing ties. Smaller numbers increase speed. Larger numbers lead to better sampling. |

`...` |
additional arguments, to be passed to lower-level functions. |

Caimo, A. and Friel, N. (2011), "Bayesian Inference for Exponential Random Graph Models," Social Networks, 33(1), 41-55. https://arxiv.org/abs/1007.5192

Caimo, A. and Friel, N. (2014), "Bergm: Bayesian Exponential Random Graphs in R," Journal of Statistical Software, 61(2), 1-25. https://www.jstatsoft.org/v61/i02

Koskinen, J.H., Robins, G.L., Pattison, P.E. (2010), "Analysing exponential random graph (p-star) models with missing data using Bayesian data augmentation," Statistical Methodology 7(3), 366-384.

Krause, R.W., Huisman, M., Steglich, C., Snijders, T.A. (2020), "Missing data in cross-sectional networks-An extensive comparison of missing data treatment methods", Social Networks 62: 99-112.

```
## Not run:
# Load the florentine marriage network
data(florentine)
# Create missing data
set.seed(14021994)
n <- dim(flomarriage[, ])[1]
missNode <- sample(1:n, 1)
flomarriage[missNode, ] <- NA
flomarriage[, missNode] <- NA
# Posterior parameter estimation:
m.flo <- bergmM(flomarriage ~ edges + kstar(2),
burn.in = 50,
aux.iters = 500,
main.iters = 1000,
gamma = 1.2,
nImp = 5)
# Posterior summaries:
summary(m.flo)
## End(Not run)
```

[Package *Bergm* version 5.0.7 Index]