From a `PAFit_data`

object, which contains summary statistics of the dataset, PAFit estimates the attachment function *A_k* and node fitness *η_i* by penalized log-likelihood maximization. It also infers the remaining uncertainties in the estimated results by approximating the confidence intervals of *A_k* and *η_i*.

Estimation of either the attachment function or node fitness in isolation are also supported. Estimation of the PA function with *η_i = 1* can be specified by setting `only_PA = TRUE`

. Estimation of node fitness with either *A_k = k* or *A_k = 1* can be specified by setting `only_f = TRUE`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
PAFit (net_stat,
only_PA = FALSE , only_f = FALSE ,
mode_f = "Linear_PA" ,
true_A = NULL , true_f = NULL ,
mode_reg_A = 0 , weight_PA_mode = 1 ,
s = 10 , lambda = 1 ,
auto_lambda = TRUE , r = 0.01 ,
alpha_start = 1 , start_mode_A = "Log_linear",
start_mode_f = "Constant" ,
auto_stop = TRUE , stop_cond = 10^-7 ,
iteration = 200 , max_iter = 2e+05 ,
debug = FALSE , q = 1 ,
step_size = 0.5 ,
normalized_f = FALSE , interpolate = FALSE)
``` |

The parameters can be divided into five groups based on what they specify.

First group specifies basic instructions for the algorithm:

`net_stat` |
An object of class |

`only_PA` |
Logical. |

`only_f` |
Logical. |

`mode_f` |
String. Possible values: |

`true_A` |
Numeric vector. User-supplemented value of the PA function. If |

`true_f` |
Numeric vector. User-supplemented value of node fitnesses. If |

Second group specifies the objective function, e.g. the weighting of PA, the regularization terms for PA and fitness:

`mode_reg_A` |
Integer. Possible values: |

`weight_PA_mode` |
Binary. Indicates how the regularization terms for |

`s` |
Positive numeric. The regularization parameter |

`lambda` |
Non-negative numeric. The absolute strength of the regularization for PA function. Ignored when |

`auto_lambda` |
Logical. If |

`r` |
Non-negative numeric. The regularization parameter |

Third group specifies the initial value of PA and fitness:

`alpha_start` |
Non-negative numeric. The starting value for |

`start_mode_A` |
String. Takes one of two values: |

`start_mode_f` |
String. Takes one of two values: |

Fourth group concerns the iterative process:

`auto_stop` |
Logical. Indicates whether the algorithm stop automatically or not. Default is |

`stop_cond` |
Numeric. If |

`iteration` |
Integer. The number of iterations. Ignored if |

`max_iter` |
Integer. The maximum number of iterations. Regardless of other settings, the algorithm will stop once the number of iterations reaches this threshold. Default value is |

`debug` |
Logical. if |

`q` |
Integer. Indicates numbers of previous steps using in the quasi-Newton speedup. Ignored if |

`step_size` |
Numeric. A number between |

Final group gives some additional instructions:

`normalized_f` |
Logical. Indicates whether we should normalize the estimated value of node fitness after estimation. Default value is |

`interpolate` |
Logical. Indicates whether we should perform interpolation for the missing gaps in the estimated |

an object of class "PAFit_result", which is a list. Some important fields can be divided into five groups.

The first group gives the estimated preferential attachment function:

`k` |
The observed degree vector |

`A ` |
The estimated attachment function corresponding to |

`center_k` |
The logarithmic center of the bins |

`theta` |
Preferential attachment value corresponding to |

`weight_of_A` |
The number of |

`loglinear_fit` |
Result of fitting the log-linear model |

`alpha` |
The estimated attachment exponent of the log-linear model |

`ci` |
The confidence interval of the attachment exponent. It is two-sigma. When |

`alpha_series` |
The series of |

The second group gives the confidence intervals of the estimated PA function:

`var_A` |
Variances of the estimated A |

`var_logA` |
Variances of |

`upper_A` |
The upper value of the two-sigma confidence interval of A |

`lower_A` |
The lower value of the two-sigma confidence interval of A |

`upper_bin` |
The upper value of the two-sigma confidence interval of theta |

`lower_bin` |
The lower value of the two-sigma confidence interval of theta |

The third group gives the estimated node fitnesses:

`f` |
The estimated node fitnesses |

The fourth group gives the confidence intervals of the estimated node fitnesses:

`var_f` |
Variances of the estimated node fitnesses |

`upper_f` |
The upper value of the two-sigma confidence interval of node fitness |

`lower_f` |
The lower value of the two-sigma confidence interval of node fitness |

The final group gives additional information on the iterative process:

`objective_value` |
Values of the objective function |

Thong Pham thongpham@thongpham.net

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).

3. Pham, T., Sheridan, P. & Shimodaira, H. (2016). Joint Estimation of Preferential Attachment and Node Fitness in Growing Complex Networks. Scientific Reports 6, Article number: 32558. doi:10.1038/srep32558 (www.nature.com/articles/srep32558).

1 2 3 4 5 | ```
library("PAFit")
net <- GenerateNet(N = 50,m = 10, mode = 1, alpha = 0.5, shape = 100, rate = 100)
net_stats <- GetStatistics(net$graph)
result <- PAFit(net_stats, r = 0.01, s = 100)
summary(result)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.