ergm.ego: Inference for Exponential-Family Random Graph Models based on...

Description Usage Arguments Value Author(s) References Examples

View source: R/ergm.ego.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
ergm.ego(
  formula,
  popsize = 1,
  offset.coef = NULL,
  constraints = ~.,
  ...,
  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.

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.

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. Inference for Social Network Models from Egocentrically-Sampled Data, with Application to Understanding Persistent Racial Disparities in HIV Prevalence in the US. Thechnical Report. National Institute for Applied Statistics Research Australia, University of Wollongong, 2015(05-15). http://niasra.uow.edu.au/publications/UOW190187.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
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)

## End(Not run)

statnet/ergm.ego documentation built on April 26, 2021, 4:46 a.m.