origin-methods: methods for origin estimation objects of class origin
Description
print produces an output for objects of class origin.
summary produces an object summary for objects of class origin.
plot generates an illustration of an origin object using the variable to be optimized.
performance evaluates an object of class origin and returns a data.frame identifying correct estimation, and computing rank and distance of correct detection.
Usage
# S3 method for origin
print(x, ...)
# S3 method for origin
summary(object, x = object, ...)
# S3 method for origin
plot(x, y = "id", start, ...)
object of class origin, origin estimation object from function origin_xxx
...
further arguments to be passed to default plot function
object
object of class origin, origin estimation object from function origin_xxx; passed to x
y
character specifying the variable being plotted at the y-axis; options are 'id' for node identifier (default), 'mdist' for mean distance (only available for origin_edm) or 'wvar' for weighted variance (only available for origin_edm)
start
numeric, giving the node of the true origin
graph
igraph object specifying the underlying network graph with attribute 'length' on edges for calculation of distance to the correct origin
Value
performance.origin returns a data.frame with variables
origin = start representing the true origin,
est the estimated node of origin,
hitt logical indicating whether origin estimation is correct or not,
rank rank of correct detection,
spj number of segments from estimated origin to true origin (requires an igraph object),
dist distance along the shortest path from estimated origin to true origin (igraph edge attribute length)
# NOT RUN {data(ptnGoe)
data(delayGoe)
res <- origin(events=delayGoe[10,-c(1:2)], type='centrality', graph=ptnGoe)
res
summary(res)
plot(res, start=1)
performance(res, start=1, graph=ptnGoe)
# }