Learn R Programming

PAFit (version 1.2.10)

plot_contribution: Plotting contributions calculated from the observed data and contributions calculated from simulated data

Description

This function extracts from a Simulated_Data_From_Fitted_Model object contributions of rich-get-richer and fit-get-richer effects calculated using simulated networks and plots these contributions versus the contributions calculated from the original observed network. See joint_estimate for a description of how the contributions are calculated.

Usage

plot_contribution(simulated_object,
                  original_result,
                  which_plot = "PA",
                  y_label = ifelse("PA" == which_plot,
                  "Contribution of the rich-get-richer effect",
                  "Contribution of the fit-get-richer effect"),
                  legend_pos_x = 0.75,
                  legend_pos_y = 0.9)

Value

Output a plot.

Arguments

simulated_object

an object of class Simulated_Data_From_Fitted_Model that contains simulated data.

original_result

an object of class Full_PAFit_result that contains the estimation results from the original observed data.

which_plot

String. ``PA": plots contributions of rich-get-richer effect, ``fit": plots contribution of fit-get-richer effect. Default is ``PA".

y_label

String. The label for y-axis. Default is "Contribution of rich-get-richer effect".

legend_pos_x

Numeric. The horizontal position, between (0,1), of the legend. Default value is 0.75.

legend_pos_y

Numeric. The vertical position, between (0,1), of the legend. Default value is 0.9.

Author

Thong Pham thongphamthe@gmail.com

References

1. Pham, T., Sheridan, P. & Shimodaira, H. (2015). PAFit: A Statistical Method for Measuring Preferential Attachment in Temporal Complex Networks. PLoS ONE 10(9): e0137796. (tools:::Rd_expr_doi("10.1371/journal.pone.0137796")).

2. 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. (tools:::Rd_expr_doi("10.1038/srep32558")).

3. Pham, T., Sheridan, P. & Shimodaira, H. (2020). PAFit: An R Package for the Non-Parametric Estimation of Preferential Attachment and Node Fitness in Temporal Complex Networks. Journal of Statistical Software 92 (3). (tools:::Rd_expr_doi("10.18637/jss.v092.i03")).

4. Inoue, M., Pham, T. & Shimodaira, H. (2020). Joint Estimation of Non-parametric Transitivity and Preferential Attachment Functions in Scientific Co-authorship Networks. Journal of Informetrics 14(3). (tools:::Rd_expr_doi("10.1016/j.joi.2020.101042")).

See Also

joint_estimate, plot_contribution

Examples

Run this code
if (FALSE) {
  
  library("PAFit")
  net_object     <- generate_net(N = 500, m = 10, s = 10, alpha = 0.5)
  net_stat       <- get_statistics(net_object) 
  result         <- joint_estimate(net_object, net_stat)
  simulated_data <- generate_simulated_data_from_estimated_model(net_object, net_stat, result)
  plot_contribution(simulated_data, result, which_plot = "PA")
  plot_contribution(simulated_data, result, which_plot = "fit")
  }

Run the code above in your browser using DataLab