test_linear_PA {PAFit} | R Documentation |
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 for
and
for all
(note that, the number of new edges and new nodes at each time-step are implicitly assumed to be
).
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 for
and
for all
is NOT consistent with the observed degree vector.
The method allows the low-tail probabilities to NOT follow the parametric distribution, i.e., for all
and
for all
. Here
is the degree threshold above which the parametric distribution holds,
are probabilities of the low-tail,
is the parametric distribution with parameter vector
.
For fixed and
,
and
can be estimated by Maximum Likelihood Estimation. We can choose the best
for each
by comparing the AIC (or BIC). More details can be founded in Handcock and Jones (2004).
Usage
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 .
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
## 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)