View source: R/plot.pafit_result.r
plot.PAFit_result | R Documentation |
PAFit_result
object
This function plots the estimated attachment function A_k
and node fitness eta_i
, together with additional information such as their confidence intervals or the estimated attachment exponent (\alpha
when assuming A_k = k^\alpha
) of a PAFit_result
object. This object is stored in the field $estimate_result
of a Full_PAFit_result
object, which in turn is the returning value of only_A_estimate
, only_F_estimate
or joint_estimate
.
## S3 method for class 'PAFit_result'
plot(x,
net_stat = NULL ,
true_f = NULL , plot = "A" , plot_bin = TRUE ,
line = FALSE , confidence = TRUE , high_deg_A = 1 ,
high_deg_f = 5 ,
shade_point = 0.5 , col_point = "grey25" , pch = 16 ,
shade_interval = 0.5 , col_interval = "lightsteelblue" , label_x = NULL ,
label_y = NULL ,
max_A = NULL , min_A = NULL , f_min = NULL ,
f_max = NULL , plot_true_degree = FALSE ,
...)
x |
An object of class |
net_stat |
An object of class |
true_f |
Vector. Optional parameter for the true value of node fitnesses (only available in simulated datasets). If this parameter is specified and |
plot |
String. Indicates which plot is produced.
Default value is |
plot_bin |
Logical. If |
line |
Logical. Indicates whether to plot the line fitted from the log-linear model or not. Default value is |
confidence |
Logical. Indicates whether to plot the confidence intervals of |
high_deg_A |
Integer. The estimated PA function is plotted starting from |
high_deg_f |
Integer. If |
col_point |
String. The name of the color of the points. Default value is |
shade_point |
Numeric. Value between 0 and 1. This is the transparency level of the points. Default value is |
pch |
Numeric. The plot symbol. Default value is |
shade_interval |
Numeric. Value between 0 and 1. This is the transparency level of the confidence intervals. Default value is |
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 fitness. |
f_max |
Numeric. Specify the maximum of the axis of fitness. |
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. |
col_interval |
String. The name of the color of the confidence intervals. Default value is |
... |
Other arguments to pass to the underlying plotting function. |
Outputs the desired plot.
Thong Pham thongphamthe@gmail.com
## Since the runtime is long, we do not let this example run on CRAN
## Not run:
library("PAFit")
set.seed(1)
# a network from Bianconi-Barabasi model
net <- generate_BB(N = 1000 , m = 50 ,
num_seed = 100 , multiple_node = 100,
s = 10)
net_stats <- get_statistics(net)
result <- joint_estimate(net, net_stats)
#plot A
plot(result$estimate_result , net_stats , plot = "A")
true_A <- c(1,result$estimate_result$center_k[-1])
lines(result$estimate_result$center_k + 1 , true_A , col = "red") # true line
legend("topleft" , legend = "True function" , col = "red" , lty = 1 , bty = "n")
#plot true_f
plot(result, net_stats , net$fitness, plot = "true_f")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.