test_linear_PA: Fitting various distributions to a degree vector

Description Usage Arguments Value Author(s) References Examples

View source: R/test_linear_PA.R

Description

This function implements the method in Handcock and Jones (2004) to fit various distributions to a degree vector. The implemented distributions are Yule, Waring, Poisson, geometric and negative binomial. The Yule and Waring distributions correspond to a preferential attachment situation. In particular, the two distributions correspond to the case of A_k = k for k ≥ 1 and η_i = 1 for all i (note that, the number of new edges and new nodes at each time-step are implicitly assumed to be 1).

Thus, if the best fitted distribution, which is chosen by either the Akaike Information Criterion (AIC) or the Bayesian Information Criterion (BIC), is NOT Yule or Waring, then the case of A_k = k for k ≥ 1 and η_i = 1 for all i is NOT consistent with the observed degree vector.

The method allows the low-tail probabilities to NOT follow the parametric distribution, i.e., P(K = k) = π_k for all k ≤ k_min and P(K = k) = f(k,θ) for all k > k_min. Here k_min is the degree threshold above which the parametric distribution holds, π_k are probabilities of the low-tail, f(.,θ) is the parametric distribution with parameter vector θ.

For fixed k_min and f, π_k and θ can be estimated by Maximum Likelihood Estimation. We can choose the best k_min for each f by comparing the AIC (or BIC). More details can be founded in Handcock and Jones (2004).

Usage

1
 test_linear_PA(degree_vector)

Arguments

degree_vector

a degree vector

Value

Outputs a Linear_PA_test_result object which contains the fitting of five distributions to the degree vector: Yule (yule), Waring (waring), Poisson (pois), geometric (geom) and negative binomial (nb). In particular, for each distribution, the AIC and BIC are calcualted for each k_min.

Author(s)

Thong Pham thongphamthe@gmail.com

References

1. Handcock MS, Jones JH (2004). “Likelihood-based inference for stochastic models of sexual network formation.” Theoretical Population Biology, 65(4), 413 – 422. ISSN 0040-5809. doi: 10.1016/j.tpb.2003.09.006. Demography in the 21st Century, https://www.sciencedirect.com/science/article/pii/S0040580904000310.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
  library("PAFit")
  set.seed(1)
  net   <- generate_BA(n = 1000)
  stats <- get_statistics(net, only_PA = TRUE)
  u     <- test_linear_PA(stats$final_deg)
  print(u)

## End(Not run)

PAFit documentation built on Jan. 18, 2022, 1:10 a.m.