Identify comparisons informed by both direct and indirect evidence from independent sources, which therefore fulfill the criteria for testing for inconsistency via node-splitting.

inconsistency.loops(df, checkindirect = TRUE, incldr = FALSE)

Arguments

df

A data frame containing variables studyID and treatment (as numeric codes) that indicate which treatments are used in which studies. If checkindirect = TRUE then variables agent and dose are also required.

checkindirect

A boolean object to indicate whether or not to perform an additional check to ensure network remains connected even after dropping direct evidence on a comparison. Default is TRUE and should be kept as TRUE if working with dose-response data, though this requires further computational iterations to confirm. If set to FALSE, additional comparisons may be identified, though computation will be much more rapid.

incldr

A boolean object indicating whether or not to allow for indirect evidence contributions via the dose-response relationship. This can be used when node-splitting in dose-response MBNMA to allow for a greater number of potential loops in which to check for consistency.

Value

A data frame of comparisons that are informed by direct and indirect evidence from independent sources. Each row of the data frame is a different treatment comparison. Numerical codes in t1 and t2 correspond to treatment codes. path indicates the treatment codes that connect the shortest path of indirect evidence.

If incldr=TRUE then path may indicate doseresp for some comparisons. These are comparisons for which indirect evidence is only available via the dose-response relationship. The two numbers given after (e.g. 3 2) indicate the number of doses available in the indirect evidence with which to estimate the dose-response function for the treatments in t1 and t2 respectively/

Details

Similar to gemtc::mtc.nodesplit.comparisons() but uses a fixed reference treatment and therefore identifies fewer loops in which to test for inconsistency. Heterogeneity can also be parameterised as inconsistency and so testing for inconsistency in additional loops whilst changing the reference treatment would also be identifying heterogeneity. Depends on igraph.

References

There are no references for Rd macro \insertAllCites on this help page.

Examples

# \donttest{
# Identify comparisons informed by direct and indirect evidence
#in triptans dataset
network <- mbnma.network(triptans)
#> Values for `agent` with dose = 0 have been recoded to `Placebo`
#> agent is being recoded to enforce sequential numbering
inconsistency.loops(network$data.ab)
#> 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |===                                                                   |   4%
  |                                                                            
  |=====                                                                 |   8%
  |                                                                            
  |========                                                              |  12%
  |                                                                            
  |===========                                                           |  15%
#> 
  |                                                                            
  |=============                                                         |  19%
#> 
  |                                                                            
  |================                                                      |  23%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |======================                                                |  31%
  |                                                                            
  |========================                                              |  35%
  |                                                                            
  |===========================                                           |  38%
  |                                                                            
  |==============================                                        |  42%
#> 
  |                                                                            
  |================================                                      |  46%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |======================================                                |  54%
#> 
  |                                                                            
  |========================================                              |  58%
  |                                                                            
  |===========================================                           |  62%
  |                                                                            
  |==============================================                        |  65%
  |                                                                            
  |================================================                      |  69%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |======================================================                |  77%
  |                                                                            
  |=========================================================             |  81%
#> 
  |                                                                            
  |===========================================================           |  85%
#> 
  |                                                                            
  |==============================================================        |  88%
#> 
  |                                                                            
  |=================================================================     |  92%
#> 
  |                                                                            
  |===================================================================   |  96%
#> 
  |                                                                            
  |======================================================================| 100%
#>    t1 t2      path
#> 10 12 15 12->1->15
#> 9   6 23  6->1->23
#> 8   6 12  6->1->12
#> 7   5 22  5->1->22

# Include indirect evidence via dose-response relationship
inconsistency.loops(network$data.ab, incldr=TRUE)
#> 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |===                                                                   |   4%
  |                                                                            
  |=====                                                                 |   8%
  |                                                                            
  |========                                                              |  12%
  |                                                                            
  |===========                                                           |  15%
#> 
  |                                                                            
  |=============                                                         |  19%
#> 
  |                                                                            
  |================                                                      |  23%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |======================                                                |  31%
  |                                                                            
  |========================                                              |  35%
  |                                                                            
  |===========================                                           |  38%
  |                                                                            
  |==============================                                        |  42%
#> 
  |                                                                            
  |================================                                      |  46%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |======================================                                |  54%
#> 
  |                                                                            
  |========================================                              |  58%
  |                                                                            
  |===========================================                           |  62%
  |                                                                            
  |==============================================                        |  65%
  |                                                                            
  |================================================                      |  69%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |======================================================                |  77%
  |                                                                            
  |=========================================================             |  81%
#> 
  |                                                                            
  |===========================================================           |  85%
#> 
  |                                                                            
  |==============================================================        |  88%
#> 
  |                                                                            
  |=================================================================     |  92%
#> 
  |                                                                            
  |===================================================================   |  96%
#> 
  |                                                                            
  |======================================================================| 100%
#>    t1 t2         path
#> 26 12 15    12->1->15
#> 25  6 23     6->1->23
#> 24  6 12     6->1->12
#> 23  5 22     5->1->22
#> 20  1 21 drparams 5 3
#> 19  1 20 drparams 5 2
#> 18  1 19 drparams 5 2
#> 17  1 18 drparams 4 5
#> 16  1 17 drparams 4 5
#> 15  1 16 drparams 4 5
#> 13  1 14 drparams 4 5
#> 12  1 13 drparams 5 3
#> 10  1 11 drparams 5 3
#> 9   1 10 drparams 5 2
#> 8   1  9 drparams 5 2
#> 7   1  8 drparams 5 4
#> 6   1  7 drparams 5 4
#> 3   1  4 drparams 5 3
#> 2   1  3 drparams 5 3
#> 1   1  2 drparams 5 3
# }


# Do not perform additional connectivity check on data
data <- data.frame(studyID=c(1,1,2,2,3,3,4,4,5,5,5),
            treatment=c(1,2,1,3,2,3,3,4,1,2,4)
            )
inconsistency.loops(data, checkindirect=FALSE)
#> 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |======================================================================| 100%
#>   t1 t2    path
#> 5  3  4 3->1->4
#> 4  2  3 2->1->3