# NOT RUN {
# }
# NOT RUN {
if (require("ergm")) {
# Using the same example as the ergm package
# Load the Florentine marriage network data
data(florentine)
# Fit a model where the propensity to form ties between
# families depends on the absolute difference in wealth
gest <- ergm(flomarriage ~ edges + absdiff("wealth"))
# Show terms, coefficient estimates and errors
tidy(gest)
# Show coefficients as odds ratios with a 99% CI
tidy(gest, exponentiate = TRUE, conf.int = TRUE, conf.level = 0.99)
# Take a look at likelihood measures and other
# control parameters used during MCMC estimation
glance(gest)
glance(gest, deviance = TRUE)
glance(gest, mcmc = TRUE)
}
# }
Run the code above in your browser using DataLab