summary_formula.egor: Calculation of ERGM-style summary statistics for 'egor'...

View source: R/summary.statistics.egor.R

summary_formula.egorR Documentation

Calculation of ERGM-style summary statistics for egor objects.

Description

Used to calculate the specified network statistics inferred from a egor object.

Usage

## S3 method for class 'egor'
summary_formula(object, ..., basis = NULL, individual = FALSE, scaleto = NULL)

## S3 method for class 'ergm.ego_svystat'
x * y

Arguments

object

An ergm-style formula with a egor object as the LHS.

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

...

Not used at this time.

basis

An optional egor object relative to which the statistics should be calculated.

individual

If FALSE (the default), calculate the estimated per-capita statistics, weighted according to the ego weights, then scale them up to a network of size scaleto.

If TRUE, calculate each ego's individual contribution to the specified network statistics.

scaleto

Size of a hypothetical network to which to scale the statistics. Defaults to the number of egos in the dataset.

x, y

see *.svystat.

Value

If individual==FALSE, an ergm.ego_svystat object, which is a subclass of svystat—effectively a named vector of statistics. If individual==TRUE, a matrix with a row for each ego, giving that ego's contribution to the network statistic.

Functions

  • * : A multiplication method that takes into account which statistics are scalable.

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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/16-AOAS1010")}

  • 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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.stamet.2011.01.005")}

See Also

summary_formula, summary_formula.ergm

Examples


data(faux.mesa.high)
fmh.ego <- as.egor(faux.mesa.high)
(nw.summ <- summary(faux.mesa.high~edges+degree(0:3)+nodematch("Race")+
                    nodematch("Sex")+absdiff("Grade")+nodemix("Grade")))

(ego.summ <- summary(fmh.ego~edges+degree(0:3)+nodematch("Race")+nodematch("Sex")+
                     absdiff("Grade")+nodemix("Grade"),
                     scaleto=network.size(faux.mesa.high)))

stopifnot(isTRUE(all.equal(as.vector(nw.summ),as.vector(ego.summ))))


(ego.summ2 <- summary(fmh.ego ~ edges + meandeg + degree(0:2)))
vcov(ego.summ2)

ego.summ2 * 2 # edges and degrees scales, meandeg doesn't
vcov(ego.summ2 * 2)


ergm.ego documentation built on May 31, 2023, 7:28 p.m.