Learn R Programming

PAFit (version 0.7.9)

plot.PAFit: A function to plot the estimated attachment function and node fitness

Description

This function plots the estimated attachment function $A_k$ and node fitness $eta_i$, together with additional information such as their confidence intervals.

Usage

"plot"(x,data,true_f = NULL, plot = c("A","f","true_f"), plot_bin = TRUE, line = FALSE, confidence = TRUE, high_deg = NULL, shade_point = 0.5, shade_interval = 0.5, max_A = NULL, min_A = NULL, f_min = NULL, f_max = NULL, plot_true_degree = FALSE, label_x = NULL, label_y = NULL,...)

Arguments

x
An object of class "PAFit", containing the result
data
An object of class "PAFitData", containing the summerized statistics.
true_f
Vector. Optional parameter for the true value of node fitnesses (only available in simulated datasets). If this parameter is specified and plot == "true_f", a plot of estimated $f$ versus true $f$ is produced (after a suitable rescaling of the estimated $f$).
plot
String. Indicates which plot is produced. Default value is "A".
plot_bin
Logical. If TRUE then only the center of each bin is plotted. Default is TRUE.
line
Logical. Indicates whether to plot the line fitted from the log-linear model or not. Default value is TRUE.
confidence
Logical. Indicates whether to plot the confidence intervals of $A_k$ and $eta_i$ or not. If confidence == TRUE, a 2-sigma confidence interval will be plotted at each $A_k$ and $eta_i$.
high_deg
Integer. If this parameter is specified, only nodes whose number of edges acquired is not less than $high_deg$ is plotted.
shade_point
Numeric. Value between 0 and 1. This is the transparency level of the points. Default value is 0.5.
shade_interval
Numeric. Value between 0 and 1. This is the transparency level of the confidence intervals. Default value is 0.5.
max_A
Numeric. Specify the maximum of the axis of PA.
min_A
Numeric. Specify the minimum of the axis of PA.
f_min
Numeric. Specify the minimum of the axis of f.
f_max
Numeric. Specify the maximum of the axis of f.
plot_true_degree
Logical. The degree of each node is plotted or not.
label_x
String. The label of x-axis.
label_y
String. The label of y-axis.
...

Value

Outputs the desired plot.

References

1. Pham, T., Sheridan, P. & Shimodaira, H (2016). Nonparametric Estimation of the Preferential Attachment Function in Complex Networks: Evidence of Deviations from Log Linearity, Proceedings of ECCS 2014, 141-153 (Springer International Publishing) (http://dx.doi.org/10.1007/978-3-319-29228-1_13).

2. Pham T, Sheridan P, Shimodaira H (2015) PAFit: A Statistical Method for Measuring Preferential Attachment in Temporal Complex Networks. PLoS ONE 10(9): e0137796. doi:10.1371/journal.pone.0137796 (http://dx.doi.org/10.1371/journal.pone.0137796)

Examples

Run this code
library("PAFit")
data   <- GenerateNet(N = 100,m = 1,mode = 1, alpha = 1, shape = 5, rate = 5)
stats  <- GetStatistics(data$graph,deg_thresh = 1, Binning = TRUE, G = 50)
result <- PAFit(stats,stop_cond = 10^-3)
#plot A
plot(result,stats,plot = "A")
#plot f
plot(result,stats,plot = "f")
#plot true_f
plot(result,stats,data$fitness, plot = "true_f")

Run the code above in your browser using DataLab