ergm.ego {ergm.ego}R Documentation

Inference for Exponential-Family Random Graph Models based on Egocentrically Sampled Data

Description

A wrapper around the ergm to fit an ERGM to an egor.

Usage

ergm.ego(
  formula,
  popsize = 1,
  offset.coef = NULL,
  constraints = ~.,
  ...,
  basis = eval_lhs.formula(formula),
  control = control.ergm.ego(),
  na.action = na.fail,
  na.rm = FALSE,
  do.fit = TRUE
)

Arguments

formula

An formula object, of the form e ~ <model terms>, where e is a egor object. See ergm for details and examples.

For a list of currently implemented egocentric terms for the RHS, see ergm.ego-terms.

popsize

The size |N| of the finite population network from which the egocentric sample was taken; only affects the shift in the coefficients of the terms modeling the overall propensity to have ties. Setting it to 1 (the default) essentially uses the -\log |N'| offset on the edges term. Passing 0 disables network size adjustment and uses the egocentric sample size; passing I(N) uses the specified size N (though can be overridden by the ppop control.ergm.ego() option) and disables network size adjustment.

offset.coef

A vector of coefficients for the offset terms.

constraints

A one-sided formula formula giving the sample space constraints. See ergm for details and examples.

...

Additional arguments passed to ergm.

basis

a value (usually an egor) to override the LHS of the formula.

control

A control.ergm.ego control list.

na.action

How to handle missing actor attributes in egos or alters, when the terms need them for models that scale.

na.rm

How to handle missing actor attributes in egos or alters, when the terms need them for models that do not scale.

do.fit

Whether to actually call ergm

Value

An object of class ergm.ego inheriting from ergm, with the following additional or overridden elements:

"v"

Variance-covariance matrix of the estimate of the sufficient statistics

"m"

Estimate of the sufficient statistics

"egor"

The egor object passed

"popsize"

Population network size used

"ppopsize"

Pseudopopulation size used, see control.ergm.ego

"coef"

The coefficients, along with the network size adjustment netsize.adj coefficient.

"covar"

Pseudo-MLE estimate of the variance-covariance matrix of the parameter estimates under repeated egocentric sampling

"ergm.covar"

The variance-covariance matrix of parameter estimates under the ERGM superpopulation process (without incorporating sampling).

"DtDe"

Estimated Jacobian of the expectation of the sufficient statistics with respect to the model parameters

Author(s)

Pavel N. Krivitsky

References

Pavel N. Krivitsky and Martina Morris (2017). "Inference for social network models from egocentrically sampled data, with application to understanding persistent racial disparities in HIV prevalence in the US." Annals of Applied Statistics, 11(1): 427–455. doi:10.1214/16-AOAS1010

Pavel N. Krivitsky, Martina Morris, and Michał Bojanowski (2019). "Inference for Exponential-Family Random Graph Models from Egocentrically-Sampled Data with Alter–Alter Relations." NIASRA Working Paper 08-19. https://www.uow.edu.au/niasra/publications/

Pavel N. Krivitsky, Michał Bojanowski, and Martina Morris (2020). "Impact of survey design on estimation of exponential-family random graph models from egocentrically-sampled data." Social Networks, to appear. doi:10.1016/j.socnet.2020.10.001

Pavel N. Krivitsky, Mark S. Handcock, and Martina Morris (2011). "Adjusting for Network Size and Composition Effects in Exponential-Family Random Graph Models." Statistical Methodology, 8(4): 319–339. doi:10.1016/j.stamet.2011.01.005

See Also

ergm()

Examples


data(faux.mesa.high)
fmh.ego <- as.egor(faux.mesa.high)

head(fmh.ego)

egofit <- ergm.ego(fmh.ego~edges+degree(0:3)+nodefactor("Race")+nodematch("Race")
                         +nodefactor("Sex")+nodematch("Sex")+absdiff("Grade")+gwesp(0,fix=TRUE), 
                          popsize=network.size(faux.mesa.high))

# Run convergence diagnostics
mcmc.diagnostics(egofit)

# Estimates and standard errors
summary(egofit)



[Package ergm.ego version 1.1.0 Index]