GenerateReport {rsides}R Documentation

Generate a Word-based summary of subgroup search results

Description

This function creates a detailed summary of subgroup search results in a Microsoft Word format.

Usage

GenerateReport(results, report_title, report_filename)

Arguments

results

Object of class SubgroupSearchResults created by the SubgroupSearch function.

report_title

Character value defining the report's title.

report_filename

Character value defining the report's filename. The report is saved in the current working directory.

Value

No return value, called for side effects

See Also

SubgroupSearch

Examples

  
    # Example of a subgroup search in a trial with a binary endpoint
    # This example used an example data set (binary) that comes with the package
    # Primary endpoint parameters

    endpoint_parameters = list(outcome_variable = "outcome", 
                              type = "binary",    
                              label = "Outcome",
                              analysis_method = "Z-test for proportions", 
                              direction = 1)

    ##############################################################################

    # Data set parameters

    # Set of candidate biomarkers
    biomarker_names = c("biomarker1", "biomarker2", 
                        "biomarker3", "biomarker4", 
                        "biomarker5")

    # Biomarker type 
    biomarker_types = c(rep("numeric", 4), "nominal")

    # Data set parameters
    data_set_parameters = list(data_set = binary,
                              treatment_variable_name = "treatment",
                              treatment_variable_control_value = "0",
                              biomarker_names = biomarker_names,
                              biomarker_types = biomarker_types)

    ##############################################################################

    # Algorithm parameters for the basic SIDES procedure

    # Algorithm
    subgroup_search_algorithm = "SIDES procedure"

    # Number of permutations to compute multiplicity-adjusted treatment 
    # effect p-values within promising subgroups
    n_perms_mult_adjust = 10

    # Number of processor cores (use less or equal number of CPU cores on the current host)
    ncores = 1

    # Default values for the search depth (2), search width (2), 
    # maximum number of unique values for continuous biomarkers (20)

    # Algorithm parameters
    algorithm_parameters = list(
      n_perms_mult_adjust = n_perms_mult_adjust,
      min_subgroup_size = 60,
      subgroup_search_algorithm = subgroup_search_algorithm,
      ncores = ncores,
      random_seed = 3011)

    # Perform subgroup search

    # List of all parameters
    parameters = list(endpoint_parameters = endpoint_parameters,
                      data_set_parameters = data_set_parameters,
                      algorithm_parameters = algorithm_parameters)

    # Perform subgroup search
    results = SubgroupSearch(parameters)

    # Simple summary of subgroup search results
    results

    # Generate a detailed Word-based report with a summary of subgroup search results
    GenerateReport(
      results,
      report_title = "Subgroup search report", 
      report_filename = tempfile(
        "Subgroup search report.docx", 
        fileext=".docx"
      )
    ) 
  

[Package rsides version 0.1 Index]