degreedist.egor: Plotting the degree distribution of an egocentric dataset

Description Usage Arguments Value See Also Examples

View source: R/degreedist.R

Description

A degreedist() method for egodata objects: plot a histogram of the degree distribution of actors in the egocentric dataset, optionally broken down by group and/or compared with a Bernoulli graph.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S3 method for class 'egor'
degreedist(
  object,
  freq = FALSE,
  prob = !freq,
  by = NULL,
  brgmod = FALSE,
  main = NULL,
  plot = TRUE,
  weight = TRUE,
  ...
)

Arguments

object

A egor object.

freq, prob

Whether to plot the raw frequencies or the conditional proportions of the degree values. Defaults to the latter.

by

A character vector giving the name of a vertex attribute; if given, plots the frequences broken down by that attribute.

brgmod

Plot the range of predicted frequencies/probabilities according to a Bernoulli graph having the same expected density as the observed.

main

Main title of the plot.

plot

Whether to plot the histogram; if FALSE, graphical parameters and bgrmod have no effect.

weight

Whether sampling weights should be incorporated into the calculation (TRUE, the default) or ignored (FALSE).

...

Additional arguments to simulate.ergm.ego().

Value

Returns either a vector of degree frequencies/proportions if by=NULL or a matrix with a row for each category if not. If plot==TRUE returns invisibly.

See Also

degreedist, summary

Examples

1
2
3
4
5
6
data(faux.mesa.high)
fmh.ego <- as.egor(faux.mesa.high)

degreedist(fmh.ego,by="Grade",brgmod=TRUE)
# Compare:
degreedist(faux.mesa.high)

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