Open albertchai01 opened 6 years ago
Switch has been added to assume that if the maximal subgroup is equal to 1, then there would no additional groups because the subgroup is equivalent to the main group. However, program still can think that groups may have other subgroups even though they are not really present.
The following error message was produced with data; sampledata_2
source('main_current.R',echo = FALSE) .... Starting maximum likelihood estimation via MCMLE: Iteration 1 of at most 20: Error in rbind(if (!is.null(x2)) t(gamma t(x2crs) + (1 - margin gamma) * : object 'm2crs' not found In addition: Warning messages: 1: In count_max_cliques(g) : At maximal_cliques_template.h:203 :Edge directions are ignored for maximal clique calculation 2: In cliques(g) : At igraph_cliquer.c:56 :Edge directions are ignored for clique calculations 3: In maximal.cliques(g) : At maximal_cliques_template.h:203 :Edge directions are ignored for maximal clique calculation 4: In maximal.cliques.count(g) : At maximal_cliques_template.h:203 :Edge directions are ignored for maximal clique calculation 5: In cliques(g) : At igraph_cliquer.c:56 :Edge directions are ignored for clique calculations pre_check_clique_pres <- count_max_cliques(g) Warning message: In count_max_cliques(g) : At maximal_cliques_template.h:203 :Edge directions are ignored for maximal clique calculation pre_check_clique_pres [1] 4`
This data does not have any subgroups, nor do the other ones except for Group 6 that is confirmed to have known subgroups
Error only appears in sample_data2, all other cases work.
Need to integrate a logical switch to check if input network has a subgroup and to execute subgroup calculations only if those conditions are met. Script terminates currently for groups with no subgroups because parameters are not compatible.