plot.PA_result {PAFit} | R Documentation |
Plotting the estimated attachment function
Description
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
).
Usage
## 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 ,
...)
Arguments
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. |
Value
Outputs the desired plot.
Author(s)
Thong Pham thongphamthe@gmail.com
Examples
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")