summary_formula.egor {ergm.ego}R 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

Author(s)

Pavel N. Krivitsky

References

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)


[Package ergm.ego version 1.1.0 Index]