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 For a list of currently implemented egocentric terms for the RHS, see
|
... |
Not used at this time. |
basis |
An optional |
individual |
If If |
scaleto |
Size of a hypothetical network to which to scale the statistics. Defaults to the number of egos in the dataset. |
x , y |
see |
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. 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. 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)