View source: R/get_statistics.R
get_statistics | R Documentation |
The function summarizes input data into sufficient statistics for estimating the attachment function and node fitness, together with additional information about the data, such as total number of nodes, number of time-steps, maximum degree, and the final degree of the network, etc. . It also provides mechanisms to automatically deal with very large datasets by binning the degree, setting a degree threshold, or grouping time-steps.
get_statistics(net_object, only_PA = FALSE ,
only_true_deg_matrix = FALSE ,
binning = TRUE , g = 50 ,
deg_threshold = 0 ,
compress_mode = 0 , compress_ratio = 0.5 ,
custom_time = NULL)
The parameters can be divided into four groups. The first group specifies input data and how the data will be summarized:
net_object |
An object of class |
only_PA |
Logical. Indicates whether only the statistics for estimating |
only_true_deg_matrix |
Logical. Return only the true degree matrix (without binning), and no other statistics is returned. The result cannot be used in |
Second group of parameters specifies how to bin the degrees:
binning |
Logical. Indicates whether the degree should be binned together. Default value is |
g |
Positive integer. Number of bins. Should be at least |
Third group contains a single parameter specifying how to reduce the number of node fitnesses:
deg_threshold |
Integer. We only estimate the fitnesses of nodes whose number of new edges acquired is at least |
Last group of parameters specifies how to group the time-stamps:
compress_mode |
Integer. Indicates whether the timeline should be compressed. The value of CompressMode:
Default value is |
compress_ratio |
Numeric. Indicates how much we should compress if CompressMode is |
custom_time |
Vector. Custom time stamps. This vector is a subset of the vector that contains all time-stamps. Only effective if |
An object of class PAFit_data
, which is a list. Some important fields are:
offset_tk |
A matrix where the |
n_tk |
A matrix where the |
m_tk |
A matrix where the |
sum_m_k |
A vector where the |
node_degree |
A matrix recording the degree of all nodes (that satisfy |
m_t |
A vector where the |
z_j |
A vector where the |
N |
Numeric. The number of nodes in the network |
T |
Numeric. The number of time steps |
deg_max |
Numeric. The maximum degree in the final network |
node_id |
A vector contains the id of all nodes |
final_deg |
A vector contains the final degree of all nodes (including those that do not satisfy the |
deg_thresh |
Integer. The specified degree threshold. |
f_position |
Numeric vector. The index in the |
start_deg |
Integer. The specified degree at which we start binning. |
begin_deg |
Numeric vector contains the beginning degree of each bin |
end_deg |
Numeric vector contains the ending degree of each bin |
interval_length |
Numeric vector contains the length of each bin. |
binning |
Logical. Indicates whether binning was applied or not. |
g |
Integer. Number of bins |
time_compress_mode |
Integer. The mode of time compression. |
t_compressed |
Integer. The number of time stamps actually used |
compressed_unique_time |
The time stamps that are actually used |
compress_ratio |
Numeric. |
custom_time |
Vector. The time stamps specified by user. |
Thong Pham thongphamthe@gmail.com
For creating the needed input for this function (a PAFit_net
object), see as.PAFit_net
, from_igraph
, from_networkDynamic
, and graph_from_file
.
For the next step, see Newman
, Jeong
or only_A_estimate
for estimating the attachment function in isolation, only_F_estimate
for estimating node fitnesses in isolation, and joint_estimate
for joint estimation of the attachment function and node fitnesses.
library("PAFit")
net <- generate_BA(N = 100 , m = 1)
net_stats <- get_statistics(net)
summary(net_stats)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.