HOasso: Evalutes Higer Order Assortativity of complex networks

View source: R/HOasso.R

HOassoR Documentation

Evalutes Higer Order Assortativity of complex networks

Description

The function evalutes Higer Order Assortativity of complex networks represented by objects of class igraph from the package of the same name.

Usage

HOasso(
    g,
    h = 1,
    weighted = is.weighted(g),
    x = c("sout", "dout", "lout", "sin", "din", "lin"),
    y = c("sin", "din", "lin", "sout", "dout", "lout")
)

  ## S3 method for class 'assortativity'
plot(x,
    type = "h",
    ylim = c(-1, 1),
    xlab = "Orders",
    ylab = "Assortativity",
    ...
  )

  ## S3 method for class 'assortativity'
print(x, ...)

Arguments

g

an object of class igraph with two columns, listing the dominances, by rows.

h

an integer value, the function will evaluates the assortativity from the order 1 to the order h.

weighted

logical, if to use the weighted matrix to create the trasnition probabilities.

x

In case of the HOasso function the first centrarlity measure, out-strength by default, see details. An object of class assortativity in case of the print and plot functions

y

The second centrarlity measure, in-strength by default, see details.

type

Type of plot, histogram-like vertical lines by default.

xlab

A label for the x axis, Orders by default.

ylab

A label for the x axis, Assortativity by default.

ylim

The y limits of the plot, the assortativity index can assume only values between -1 and 1.

...

Other arguments of the plot.default or the print.default functions.

Details

Arguments x and y are character objects and can assume values "sout", "dout", "lout", "sin", "din", "lin" representing the out-strength, out-degree, out-log-strength, in-strength, in-degree, and in-log-strength respectively.

In case of undirected graphs in- and out- centrality measures are equal. In case of unweighted graphs the strength is equal to the degree.

The function returns an object of class assortativity subclass of a numeric vector.

plot.assortativity is identical to plot.default but with different defaults in order to get a plot coherent with the assortativity index.

print.assortativity is a method to show the assortativity values and the order side by syde.

Value

A vector h long containing the assortativity measures from the order 1 to the order h.

References

\insertRef

arcagni2017higherHOasso

\insertRef

arcagni2021extendingHOasso

\insertRef

arcagni2023higherHOasso

Examples

  g <- graph_from_data_frame(data.frame(
    from   = c("i", "j", "j", "k", "l"),
    to     = c("k", "k", "l", "l", "i"),
    weight = c( 10,  5,   2,   3,   2 )
  ))
  E(g)$label <- E(g)$weight
  a <- HOasso(g, h = 10)
  print(a)
  plot(a, lwd = 3, panel.first = abline(h = 0, lty = 2))

HOasso documentation built on Sept. 8, 2023, 5:55 p.m.

Related to HOasso in HOasso...