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

Description Usage Arguments Value Author(s) References See Also Examples

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

Description

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

Usage

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

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.

Value

If individual==FALSE, a svystat object—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.

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). doi: 10.1214/16-AOAS1010

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

See Also

summary_formula, summary_formula.ergm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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))))

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