Learn R Programming

PAFit (version 1.2.10)

test_linear_PA: Fitting various distributions to a degree vector

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 \ge 1\) and \(\eta_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 \ge 1\) and \(\eta_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) = \pi_k\) for all \(k \le k_{min}\) and \(P(K = k) = f(k,\theta)\) for all \(k > k_{min}\). Here \(k_{min}\) is the degree threshold above which the parametric distribution holds, \(\pi_k\) are probabilities of the low-tail, \(f(.,\theta)\) is the parametric distribution with parameter vector \(\theta\).

For fixed \(k_{min}\) and \(f\), \(\pi_k\) and \(\theta\) 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

test_linear_PA(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\).

Arguments

degree_vector

a degree vector

Author

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. tools:::Rd_expr_doi("10.1016/j.tpb.2003.09.006"). Demography in the 21st Century, https://www.sciencedirect.com/science/article/pii/S0040580904000310.

Examples

Run this code
if (FALSE) {
  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)
}

Run the code above in your browser using DataLab