R version 4.4.0 alpha (2024-03-26 r86209 ucrt) Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > > if (FALSE) { + #setwd("tests") + rm(list = ls()) + library(PAFit) + set.seed(1) + prob_m <- "FALSE" + inc <- "FALSE" + log <- c("FALSE") + + M <- 5 + + alpha_vec <- rep(0,M) + s_vec <- rep(0,M) + alpha_optimal <- rep(0,M) + r_optimal <- rep(0,M) + for (i in 1:M) { + #set.seed(1) + net <- generate_net(N = 1000, m = 50, num_seed = 500, + multiple_node = 50, alpha = 1, + s = 5) + #shape = 1, rate = 1) + + net_stats <- get_statistics(net) + + print(result <- joint_estimate(net, net_stats)) + + #result + + alpha_vec[i] <- result$estimate_result$alpha + s_vec[i] <- result$estimate_result$shape + alpha_optimal[i] <- result$cv_result$alpha_optimal + r_optimal[i] <- result$cv_result$r_optimal + } + print(alpha_vec) + print(mean(alpha_vec)) + print(s_vec) + print(mean(s_vec)) + } > > proc.time() user system elapsed 0.18 0.09 0.21