View source: R/plot.pa_result.R
plot.PA_result | R Documentation |
This function plots the estimated attachment function from the corrected Newman's method or the Jeong's method. Its also plots additional information such as the estimated attachment exponenent (\alpha
when assuming A_k = k^\alpha
).
## S3 method for class 'PA_result'
plot(x,
net_stat = NULL,
plot_bin = TRUE ,
high_deg = 1 ,
line = FALSE ,
col_point = "black",
shade_point = 0.5 ,
pch = 16 ,
max_A = NULL ,
min_A = NULL ,
label_x = NULL ,
label_y = NULL ,
...)
x |
An object of class |
net_stat |
An object of class |
plot_bin |
Logical. If |
high_deg |
Integer. Specifies the starting degree from which |
line |
Logical. Indicates whether to plot the line fitted from the log-linear model or not. Default value is |
col_point |
String. The name of the color of the points. Default value is |
shade_point |
Numeric. Value between |
pch |
Numeric. The plot symbol. Default value is |
max_A |
Numeric. Specify the maximum of the horizontal axis. |
min_A |
Numeric. Specify the minimum of the horizontal axis. |
label_x |
String. The label of x-axis. If |
label_y |
String. The label of y-axis. If |
... |
Other arguments to pass to the underlying plotting function. |
Outputs the desired plot.
Thong Pham thongphamthe@gmail.com
library("PAFit")
net <- generate_net(N = 1000 , m = 1 , mode = 1 , alpha = 1 , s = 0)
net_stats <- get_statistics(net)
result <- Newman(net, net_stats)
# true function
true_A <- result$center_k
# plot the estimated attachment function
plot(result , net_stats)
lines(result$center_k, true_A, col = "red") # true attachment function
legend("topleft" , legend = "True function" , col = "red" , lty = 1 , bty = "n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.