Skip to contents

Trial concept calculated: number of active arms with different investigational medicines, after excluding comparator, auxiliary and placebo arms / medicines. For ISRCTN, this is imprecise because arms are not identified in a field. Most registers provide no or only limited information on phase 1 trials, so that this number typically cannot be calculated for these trials. Requires packages stringdist to be installed; stringdist is used for evaluating names of active substances, which are considered similar when the similarity is 0.8 or higher.

Usage

f.numTestArmsSubstances(df = NULL)

Arguments

df

data frame such as from dbGetFieldsIntoDf. If `NULL`, prints fields needed in `df` for calculating this trial concept, which can be used with dbGetFieldsIntoDf.

Value

data frame with columns `_id` and `.numTestArmsSubstances`, an integer

Examples

# fields needed
f.controlType()
#> $euctr
#> [1] "e81_controlled"                            
#> [2] "e816_cross_over"                           
#> [3] "e817_other"                                
#> [4] "e8171_other_trial_design_description"      
#> [5] "e822_placebo"                              
#> [6] "e823_other"                                
#> [7] "e8231_comparator_description"              
#> [8] "e824_number_of_treatment_arms_in_the_trial"
#> 
#> $ctgov
#> [1] "arm_group.arm_group_type"
#> 
#> $ctgov2
#> [1] "protocolSection.designModule.designInfo.interventionModel"
#> [2] "protocolSection.armsInterventionsModule.armGroups.type"   
#> 
#> $isrctn
#> [1] "trialDesign.studyDesign"        "trialDesign.primaryStudyDesign"
#> 
#> $ctis
#> [1] "authorizedPartI.productRoleGroupInfos.productRoleName"                      
#> [2] "authorizedApplication.authorizedPartI.productRoleGroupInfos.productRoleName"
#> 

# apply trial concept when creating data frame
dbc <- nodbi::src_sqlite(
  dbname = system.file("extdata", "demo.sqlite", package = "ctrdata"),
  collection = "my_trials", flags = RSQLite::SQLITE_RO)
trialsDf <- dbGetFieldsIntoDf(
  calculate = "f.numTestArmsSubstances",
  con = dbc)
#> Querying database (10 fields)...
trialsDf
#>                  _id .numTestArmsSubstances
#> 1           12949496                      1
#> 2           13281214                      1
#> 3           17473621                     NA
#> 4  2012-003632-23-CZ                      1
#> 5  2012-003632-23-SE                      1
#> 6  2014-002606-20-PT                      2
#> 7  2014-003556-31-GB                      1
#> 8  2014-003556-31-SE                      1
#> 9  2022-500244-37-00                      1
#> 10 2022-501142-30-00                      1
#> 11 2023-505613-24-00                      2
#> 12 2023-508143-51-01                      1
#> 13 2024-510663-34-00                      1
#> 14          20343063                      1
#> 15          61070850                      2
#> 16          76463425                     NA
#> 17          80181452                      1
#> 18          88261002                      1
#> 19       NCT00617929                      1
#> 20       NCT01125800                      1
#> 21       NCT01483820                      1
#> 22       NCT01505608                      1
#> 23       NCT01592045                      1
#> 24       NCT02620761                      1
#> 25       NCT03280147                      1
#> 26       NCT03325439                      1
#> 27       NCT03431558                      1
#> 28       NCT03876704                      1
#> 29       NCT04001712                      1
#> 30       NCT04041765                      1
#> 31       NCT05969327                      1