Description Usage Arguments Details Value Note Author(s) See Also Examples
Computes observed activity durations or event counts for edges or vertices, aggregating at the edges, spell, or dyads level.
1 2 3 4 5 | edgeDuration(nd, mode = c("duration", "counts"), subject = c("edges", "spells", "dyads"),
e = seq_along(nd$mel), start = NULL, end = NULL, active.default = TRUE)
vertexDuration(nd, mode = c("duration", "counts"), subject = c("vertices", "spells"),
v = seq_len(network.size(nd)), active.default = TRUE)
|
nd |
networkDynamic object to be evaluated |
mode |
option determining if the |
subject |
option describing the unit of analysis that the durations or counts should be aggregated at. |
e |
numeric vector of edge ids to consider. |
v |
numeric vector of vertex ids to consider. |
start |
optional numeric value to be used to censor onset times. (not yet supported for vertices, must use |
end |
optional numeric value to be used to censor terminus times. (not yet supported for vertices, must use |
active.default |
logial, should edges or vertices with no timing information be considered always active by default? |
The function sums the durations of edge or vertex events or,in order to provide a useful metric for networks having zero-duration events, simply counts them. It is implemented by wrapping a call to as.data.frame.networkDynamic
or get.vertex.activity
. In many cases the output of the function will be fed to another statistical summary function like summary
or hist
. The level of aggregation can be selected by setting the subject to either spells
, edges
, or dyads
.
Note that the 'observed' durations may not match the 'true' (statistically estimated) durations for a network due to the censoring of edges/vertices.
A vector of values corresponding to the selected subjects with the count or duration of events. If the network contains no edges/vertices, numeric(0)
will be returned.
This is an early implementation of the function and its name and arguments are subject to change
skyebend
See also as.data.frame.networkDynamic
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # look at the distributions of edge durations for
# a real-world contact network
## Not run:
require(networkDynamicData)
data(hospital_contact)
summary(edgeDuration(hospital,subject='edges'))
summary(edgeDuration(hospital,mode='counts',subject='edges'))
## End(Not run)
# look at the vertex durations for a network were
# vertices are not present every day
require(networkDynamic)
data(windsurfers)
vertexDuration(windsurfers)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.