View source: R/summary.statistics.egor.R
summary_formula.egor | R Documentation |
egor
objects.Used to calculate the specified network statistics inferred from a
egor
object.
## S3 method for class 'egor'
summary_formula(object, ..., basis = NULL, individual = FALSE, scaleto = NULL)
## S3 method for class 'ergm.ego_svystat'
x * y
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 |
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.
*
: A multiplication method that takes into account which statistics are scalable.
Pavel N. Krivitsky
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")}
summary_formula
,
summary_formula.ergm
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.